summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/graphics/framebuffer.scm5
1 files changed, 4 insertions, 1 deletions
diff --git a/chickadee/graphics/framebuffer.scm b/chickadee/graphics/framebuffer.scm
index 967c115..091ab3f 100644
--- a/chickadee/graphics/framebuffer.scm
+++ b/chickadee/graphics/framebuffer.scm
@@ -29,6 +29,7 @@
#:use-module (gl)
#:use-module (gl enums)
#:use-module (chickadee math matrix)
+ #:use-module (chickadee graphics color)
#:use-module (chickadee graphics gl)
#:use-module (chickadee graphics gpu)
#:use-module ((chickadee graphics texture) #:select (make-texture null-texture))
@@ -84,6 +85,8 @@
(gl-bind-framebuffer (version-3-0 framebuffer)
(framebuffer-id framebuffer)))
+(define %clear-color (transparency 0.0))
+
(define make-framebuffer
(let ((draw-buffers (u32vector (version-3-0 color-attachment0))))
(lambda* (width height #:key (min-filter 'linear) (mag-filter 'linear)
@@ -103,7 +106,7 @@ dimensions WIDTH x HEIGHT."
;; rendering engine can set it whenever it changes to
;; this framebuffer, saving users the trouble of having
;; to this tedious task themselves.
- (viewport (make-viewport 0 0 width height))
+ (viewport (make-viewport 0 0 width height #:clear-color %clear-color))
(projection (orthographic-projection 0 width height 0 0 1))
(framebuffer (%make-framebuffer framebuffer-id
renderbuffer-id