diff options
author | David Thompson <dthompson2@worcester.edu> | 2021-05-08 10:39:40 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2021-05-08 10:40:23 -0400 |
commit | 1e392ac7e19058a0cf280c6602d44a5ae3243560 (patch) | |
tree | 8a3d88afbeae06596e4c736305007a54dd51d74d | |
parent | 72b23993fb6a9f582edcb8c475a8e372e338dcd5 (diff) |
graphics: buffer: Fix rendering of vertex arrays without indices.
-rw-r--r-- | chickadee/graphics/buffer.scm | 7 |
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)) |