summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/render/buffer.scm12
1 files changed, 6 insertions, 6 deletions
diff --git a/chickadee/render/buffer.scm b/chickadee/render/buffer.scm
index 9635db6..48362f0 100644
--- a/chickadee/render/buffer.scm
+++ b/chickadee/render/buffer.scm
@@ -516,9 +516,9 @@ be specified for the buffer."
(define* (render-vertices array #:optional count)
(gpu-state-set! *vertex-array-state* array)
- (gl-draw-elements (vertex-array-mode-gl array)
- (or count
- (typed-buffer-length
- (vertex-array-indices array)))
- (data-type unsigned-int)
- %null-pointer))
+ (let ((indices (vertex-array-indices array)))
+ (gl-draw-elements (vertex-array-mode-gl array)
+ (or count
+ (typed-buffer-length indices))
+ (typed-buffer-type-gl indices)
+ %null-pointer)))