diff options
author | Sven Gothel <[email protected]> | 2012-04-06 03:48:59 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-04-06 03:48:59 +0200 |
commit | 7c78d722afab67a90bf92cdd29244398d1f3e5cd (patch) | |
tree | ba7127b13224521eff45e417ae1acec8a9f85e7b /src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java | |
parent | c6738c828bab2ca1572635f7ba90a7a374bbdef2 (diff) |
TextureIO/TGA: Only use current GLContext if available, allowing pre-GL usage; writeFile() restricted to GL2GL3, not GL2.
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java | 6 |
1 files changed, 3 insertions, 3 deletions
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"); } |