summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sly/render/context.scm2
-rw-r--r--sly/render/texture.scm3
2 files changed, 4 insertions, 1 deletions
diff --git a/sly/render/context.scm b/sly/render/context.scm
index dc89fad..49547dc 100644
--- a/sly/render/context.scm
+++ b/sly/render/context.scm
@@ -75,7 +75,7 @@
(gl-disable (enable-cap depth-test))
(%set-render-context-depth-test?! context #f)
(glBindTexture (texture-target texture-2d) 0)
- (%set-render-context-texture! context #f)
+ (%set-render-context-texture! context null-texture)
(glUseProgram 0)
(%set-render-context-shader! context #f)
(glBindVertexArray 0)
diff --git a/sly/render/texture.scm b/sly/render/texture.scm
index 38a1800..0ebcd0c 100644
--- a/sly/render/texture.scm
+++ b/sly/render/texture.scm
@@ -47,6 +47,7 @@
texture-t1
texture-s2
texture-t2
+ null-texture
anchor-texture
texture-vertex
pack-texture-vertices
@@ -72,6 +73,8 @@
(s2 texture-s2)
(t2 texture-t2))
+(define null-texture (%make-texture 0 #f 0 0 0 0 0 0))
+
(define (texture-region? texture)
"Return #t if TEXTURE has a parent texture."
(texture? (texture-parent texture)))