From 7c78d722afab67a90bf92cdd29244398d1f3e5cd Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 6 Apr 2012 03:48:59 +0200 Subject: TextureIO/TGA: Only use current GLContext if available, allowing pre-GL usage; writeFile() restricted to GL2GL3, not GL2. --- src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java') diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java b/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java index 01c8db09d..208fd053d 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java @@ -434,7 +434,7 @@ public class Texture { * * @throws GLException if any OpenGL-related errors occurred */ - public void updateImage(GL gl, TextureData data, int target) throws GLException { + public void updateImage(GL gl, TextureData data, int targetOverride) throws GLException { validateTexID(gl, true); imgWidth = data.getWidth(); @@ -553,10 +553,10 @@ public class Texture { texParamTarget = texTarget; setImageSize(imgWidth, imgHeight, texTarget); - if (target != 0) { + if (targetOverride != 0) { // Allow user to override auto detection and skip bind step (for // cubemap construction) - texTarget = target; + texTarget = targetOverride; if (this.target == 0) { throw new GLException("Override of target failed; no target specified yet"); } -- cgit v1.2.3