diff options
author | David Thompson <dthompson2@worcester.edu> | 2016-02-23 20:29:15 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2016-02-23 20:29:15 -0500 |
commit | 9382bb1dfba13222a57ded43becc60249dce2c70 (patch) | |
tree | f38957aa5627bd4f55d9d2f87a7a03b8157d2fe6 | |
parent | 840139912553ee5045b22f8a218e909991fa79f0 (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.scm | 2 |
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) |