diff options
author | David Thompson <dthompson2@worcester.edu> | 2018-09-06 09:33:19 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2018-09-06 09:33:19 -0400 |
commit | b3f98892edacce79525523984cb72eba2473f9e6 (patch) | |
tree | 0d66ec229230e6cf43252365bf57ab2e45558b06 | |
parent | 2f5c81df88025f1a68b1d981c355cfaf9d4c1fbd (diff) |
render: buffer: Use correct data type for index buffer when rendering.
* chickadee/render/buffer.scm (render-vertices): Use the index buffer
type rather than assuming it is always unsigned-int.
-rw-r--r-- | chickadee/render/buffer.scm | 12 |
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))) |