From 15b35e8fe0f26e00691db5c31a1ab9a9f4991bb2 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 17 Oct 2017 23:05:58 -0400 Subject: render: texture: Fix bug in texture region coordinate calculation. * chickadee/render/texture.scm (make-texture-region): Fix broken texcoord width/height calculation. --- chickadee/render/texture.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)))) -- cgit v1.2.3