summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/graphics/buffer.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/chickadee/graphics/buffer.scm b/chickadee/graphics/buffer.scm
index 4b7b260..52c1293 100644
--- a/chickadee/graphics/buffer.scm
+++ b/chickadee/graphics/buffer.scm
@@ -601,7 +601,12 @@ argument may be overridden. The following values are supported:
(buffer-view-length indices))
(buffer-view-type-gl indices)
%null-pointer))
- (gl-draw-arrays (vertex-array-mode-gl array) offset count)))))
+ (gl-draw-arrays (vertex-array-mode-gl array)
+ offset
+ (or count
+ (buffer-view-length
+ (assv-ref (vertex-array-attributes array)
+ 0))))))))
(define* (render-vertices/instanced array instances #:key count (offset 0))
(with-graphics-state! ((g:vertex-array array))