summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sly/render/framebuffer.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/sly/render/framebuffer.scm b/sly/render/framebuffer.scm
index c3af36a..e533f7a 100644
--- a/sly/render/framebuffer.scm
+++ b/sly/render/framebuffer.scm
@@ -31,6 +31,7 @@
#:use-module (sly wrappers gl)
#:export (make-framebuffer
framebuffer?
+ framebuffer-null?
framebuffer-id framebuffer-renderbuffer-id
framebuffer-texture
null-framebuffer
@@ -58,6 +59,10 @@
(define null-framebuffer
(%make-framebuffer 0 0 #f))
+(define (framebuffer-null? framebuffer)
+ "Return #t if FRAMEBUFFER is the null framebuffer."
+ (eq? null-framebuffer framebuffer))
+
(define make-framebuffer
(let ((draw-buffers (u32vector (version-3-0 color-attachment0))))
(lambda (width height)