summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sly/render/context.scm2
-rw-r--r--sly/render/mesh.scm2
2 files changed, 3 insertions, 1 deletions
diff --git a/sly/render/context.scm b/sly/render/context.scm
index 49547dc..0e96e26 100644
--- a/sly/render/context.scm
+++ b/sly/render/context.scm
@@ -79,7 +79,7 @@
(glUseProgram 0)
(%set-render-context-shader! context #f)
(glBindVertexArray 0)
- (%set-render-context-mesh! context #f))
+ (%set-render-context-mesh! context null-mesh))
(define-syntax-rule (with-render-context context body ...)
(begin (render-context-reset! context)
diff --git a/sly/render/mesh.scm b/sly/render/mesh.scm
index 9eea8ed..5f577ca 100644
--- a/sly/render/mesh.scm
+++ b/sly/render/mesh.scm
@@ -206,6 +206,8 @@
(vertex-buffer-id vbo)))
buffers))))))
+(define null-mesh (%make-mesh 0 0 '()))
+
(define (generate-vertex-array)
(let ((bv (u32vector 1)))
(glGenVertexArrays 1 (bytevector->pointer bv))