summaryrefslogtreecommitdiff
path: root/chickadee/graphics/sprite.scm
diff options
context:
space:
mode:
Diffstat (limited to 'chickadee/graphics/sprite.scm')
-rw-r--r--chickadee/graphics/sprite.scm18
1 files changed, 8 insertions, 10 deletions
diff --git a/chickadee/graphics/sprite.scm b/chickadee/graphics/sprite.scm
index 8ab12f9..3a30d49 100644
--- a/chickadee/graphics/sprite.scm
+++ b/chickadee/graphics/sprite.scm
@@ -122,13 +122,11 @@ void main (void) {
(t1 (rect-y texcoords))
(s2 (+ (rect-x texcoords) (rect-width texcoords)))
(t2 (+ (rect-y texcoords) (rect-height texcoords))))
- ;; Texture origin is at the top-left, so we need to flip the Y
- ;; coordinate relative to the vertices.
(sprite-vertex-append! geometry
- (x1 y1 s1 t2)
- (x2 y1 s2 t2)
- (x2 y2 s2 t1)
- (x1 y2 s1 t1))
+ (x1 y1 s1 t1)
+ (x2 y1 s2 t1)
+ (x2 y2 s2 t2)
+ (x1 y2 s1 t2))
(geometry-index-append! geometry 0 3 2 0 2 1)))
(with-graphics-state ((g:blend-mode blend-mode)
(g:texture-0 texture))
@@ -299,10 +297,10 @@ texture may be specified via the TEXTURE-REGION argument."
(b (color-b tint))
(a (color-a tint)))
(batched-sprite-append! geometry
- (x1 y1 s1 t2 r g b a)
- (x2 y2 s2 t2 r g b a)
- (x3 y3 s2 t1 r g b a)
- (x4 y4 s1 t1 r g b a))
+ (x1 y1 s1 t1 r g b a)
+ (x2 y2 s2 t1 r g b a)
+ (x3 y3 s2 t2 r g b a)
+ (x4 y4 s1 t2 r g b a))
(geometry-index-append! geometry
vertex-offset
(+ vertex-offset 3)