summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2017-10-17 23:05:58 -0400
committerDavid Thompson <dthompson2@worcester.edu>2017-10-17 23:05:58 -0400
commit15b35e8fe0f26e00691db5c31a1ab9a9f4991bb2 (patch)
tree15c345855681abe9c916400266c7af5c0abd5009
parent5a07e08c40e4d21b1c5b239dbf1a09b8601b986e (diff)
render: texture: Fix bug in texture region coordinate calculation.
* chickadee/render/texture.scm (make-texture-region): Fix broken texcoord width/height calculation.
-rw-r--r--chickadee/render/texture.scm2
1 files changed, 1 insertions, 1 deletions
diff --git a/chickadee/render/texture.scm b/chickadee/render/texture.scm
index 0c4480b..34be3fe 100644
--- a/chickadee/render/texture.scm
+++ b/chickadee/render/texture.scm
@@ -248,7 +248,7 @@ measured in pixels and must be integers."
(let* ((tw (texture-width texture))
(th (texture-height texture))
(gl-rect (make-rect (/ x tw) (/ y th)
- (/ (+ x width) tw) (/ (+ y height) th))))
+ (/ width tw) (/ height th))))
(%make-texture-region texture x y width height gl-rect
(f32vector width height))))