From 834c8290de028cdfd16d3da11d1f6a4566ffb8c1 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 3 Apr 2012 18:24:46 +0200 Subject: Texture: Ignore enable/disable for GL_TEXTURE_EXTERNAL_OES; TextureCoords: Add convenience coord transfer method to buffer. --- .../com/jogamp/opengl/util/texture/Texture.java | 23 ++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 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 511b857af..01c8db09d 100644 --- a/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java +++ b/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java @@ -207,15 +207,23 @@ public class Texture {
      gl.glEnable(texture.getTarget());
      
- * + * + *

+ * Call is ignored if {@link #getTarget()} is {@link GLES2#GL_TEXTURE_EXTERNAL_OES}. + *

+ *

* See the performance tips above for hints * on how to maximize performance when using many Texture objects. + *

+ * @param gl the current GL object * * @throws GLException if no OpenGL context was current or if any * OpenGL-related errors occurred */ public void enable(GL gl) throws GLException { - gl.glEnable(target); + if(GLES2.GL_TEXTURE_EXTERNAL_OES != target) { + gl.glEnable(target); + } } /** @@ -226,15 +234,22 @@ public class Texture { gl.glDisable(texture.getTarget()); * + *

+ * Call is ignored if {@link #getTarget()} is {@link GLES2#GL_TEXTURE_EXTERNAL_OES}. + *

+ *

* See the performance tips above for hints * on how to maximize performance when using many Texture objects. - * @param gl TODO + *

+ * @param gl the current GL object * * @throws GLException if no OpenGL context was current or if any * OpenGL-related errors occurred */ public void disable(GL gl) throws GLException { - gl.glDisable(target); + if(GLES2.GL_TEXTURE_EXTERNAL_OES != target) { + gl.glDisable(target); + } } /** -- cgit v1.2.3