summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2016-02-05 18:22:36 -0500
committerDavid Thompson <dthompson2@worcester.edu>2016-02-10 22:01:38 -0500
commit14ea7b336cb8ac0829dee207733cff7a5df7cbe8 (patch)
tree98b85ae15e142aeca4c81cee464db3edd5476646
parentff41e8cad9d613a1701ed550c690af0959cb6b4e (diff)
render: framebuffer: Add framebuffer-null?
* sly/render/framebuffer.scm (framebuffer-null?): New procedure.
-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)