diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/classes/com/sun/opengl/util/texture/Texture.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/classes/com/sun/opengl/util/texture/Texture.java b/src/classes/com/sun/opengl/util/texture/Texture.java index ab8997ee8..46d435245 100755 --- a/src/classes/com/sun/opengl/util/texture/Texture.java +++ b/src/classes/com/sun/opengl/util/texture/Texture.java @@ -324,8 +324,8 @@ public class Texture { float tx2 = (float)x2 / (float)texWidth; float ty2 = (float)y2 / (float)texHeight; if (mustFlipVertically) { - float yOffset = 1.0f - ((float) imgHeight / (float) texHeight); - return new TextureCoords(tx1, 1.0f - yOffset - ty1, tx2, 1.0f - yOffset - ty2); + float yMax = (float) imgHeight / (float) texHeight; + return new TextureCoords(tx1, yMax - ty1, tx2, yMax - ty2); } else { return new TextureCoords(tx1, ty1, tx2, ty2); } |