summaryrefslogtreecommitdiff
path: root/2d
diff options
context:
space:
mode:
authorDavid Thompson <dthompson@member.fsf.org>2013-08-29 20:46:06 -0400
committerDavid Thompson <dthompson@member.fsf.org>2013-08-29 20:52:39 -0400
commit2f93a46fe73ab8127d2cff85fb1bba60a25ded19 (patch)
treeb3812bc8ce30709c9757dede134ff03f92038e07 /2d
parent776cd81c2fb923d934bab3686d61fbdcc8f8ab7f (diff)
Fix issue #9.
draw-sprite-vertices was drawing the entire vertex array rather than only drawing the amount specified in the size argument.
Diffstat (limited to '2d')
-rw-r--r--2d/sprite.scm4
1 files changed, 1 insertions, 3 deletions
diff --git a/2d/sprite.scm b/2d/sprite.scm
index ac57adb..7c036f3 100644
--- a/2d/sprite.scm
+++ b/2d/sprite.scm
@@ -129,9 +129,7 @@
vertices
#:stride sprite-vertex-size
#:offset s-offset)
- (gl-draw-arrays (begin-mode quads)
- 0
- (packed-array-length vertices sprite-vertex)))
+ (gl-draw-arrays (begin-mode quads) 0 (* size 4)))
(gl-disable-client-state (enable-cap texture-coord-array))
(gl-disable-client-state (enable-cap color-array))
(gl-disable-client-state (enable-cap vertex-array))))