summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2016-02-23 20:29:15 -0500
committerDavid Thompson <dthompson2@worcester.edu>2016-02-23 20:29:15 -0500
commit9382bb1dfba13222a57ded43becc60249dce2c70 (patch)
treef38957aa5627bd4f55d9d2f87a7a03b8157d2fe6
parent840139912553ee5045b22f8a218e909991fa79f0 (diff)
render: vbo: Use cached buffer length when computing index length.
* sly/render/mesh.scm (vertex-buffer-element-length): Use the cached length of the buffer bytevector.
-rw-r--r--sly/render/mesh.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/sly/render/mesh.scm b/sly/render/mesh.scm
index f1d6e2c..7f38b29 100644
--- a/sly/render/mesh.scm
+++ b/sly/render/mesh.scm
@@ -182,7 +182,7 @@
(arb-vertex-buffer-object array-buffer-arb)))
(define (vertex-buffer-element-length vbo)
- (/ (bytevector-length (vertex-buffer-data vbo))
+ (/ (vertex-buffer-length vbo)
(* (vertex-buffer-attribute-size vbo) 4)))
(define (vertex-buffer-usage-gl vbo)