summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2017-01-19 09:27:40 -0500
committerDavid Thompson <dthompson2@worcester.edu>2017-01-19 09:30:18 -0500
commit51d3c475e5c8d962b117a380f9ec58f313ca46f7 (patch)
treef4beef18f6bc80edb5ade38bd7e606b5bbf65c79
parent3227d8393d857f8df221e5df9383ca203ad418f8 (diff)
render: texture: Allow texture creation with no pixel data.
This will be useful for creating framebuffers.
-rw-r--r--chickadee/render/texture.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/chickadee/render/texture.scm b/chickadee/render/texture.scm
index 086caab..bdddc22 100644
--- a/chickadee/render/texture.scm
+++ b/chickadee/render/texture.scm
@@ -21,6 +21,7 @@
#:use-module (rnrs bytevectors)
#:use-module (srfi srfi-9)
#:use-module (srfi srfi-9 gnu)
+ #:use-module (system foreign)
#:use-module (gl)
#:use-module ((gl enums)
#:select (texture-min-filter texture-mag-filter)
@@ -148,7 +149,7 @@ clamp-to-edge. FORMAT specifies the pixel format. Currently only
(match format
('rgba (pixel-format rgba)))
(color-pointer-type unsigned-byte)
- pixels)
+ (or pixels %null-pointer))
texture))
(define (flip-pixels-vertically pixels width height)