From 9382bb1dfba13222a57ded43becc60249dce2c70 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 23 Feb 2016 20:29:15 -0500 Subject: 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. --- sly/render/mesh.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- cgit v1.2.3