From bb250ad79f2373de29f651a369fc72770b50a88d Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Thu, 13 Apr 2006 00:58:02 +0000 Subject: Fixed bug found by user Kickaha on javagaming.org forums where entire image's texture coordinates were being computed before target was set git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@711 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/classes/com/sun/opengl/util/texture/Texture.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/classes/com/sun') diff --git a/src/classes/com/sun/opengl/util/texture/Texture.java b/src/classes/com/sun/opengl/util/texture/Texture.java index 873ea006a..641f994ce 100755 --- a/src/classes/com/sun/opengl/util/texture/Texture.java +++ b/src/classes/com/sun/opengl/util/texture/Texture.java @@ -316,7 +316,7 @@ public class Texture { newTarget = GL.GL_TEXTURE_2D; } - setImageSize(imgWidth, imgHeight); + setImageSize(imgWidth, imgHeight, newTarget); if (target != 0) { // Allow user to override auto detection and skip bind step (for @@ -551,7 +551,7 @@ public class Texture { * Updates the actual image dimensions; usually only called from * updateImage. */ - private void setImageSize(int width, int height) { + private void setImageSize(int width, int height, int target) { imgWidth = width; imgHeight = height; if (target == GL.GL_TEXTURE_RECTANGLE_ARB) { -- cgit v1.2.3