aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-04-03 18:24:46 +0200
committerSven Gothel <[email protected]>2012-04-03 18:24:46 +0200
commit834c8290de028cdfd16d3da11d1f6a4566ffb8c1 (patch)
tree7d3f94063372a41b9d8a135081c0d3b765f62ac2 /src/jogl/classes/com/jogamp/opengl/util/texture/Texture.java
parent0d12af05128da433aa7b6767ba5a7f6ee9bce6c4 (diff)
Texture: Ignore enable/disable for GL_TEXTURE_EXTERNAL_OES; TextureCoords: Add convenience coord transfer method to buffer.
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.java23
1 files changed, 19 insertions, 4 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 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 {
<pre>
gl.glEnable(texture.getTarget());
</pre>
- *
+ *
+ * <p>
+ * Call is ignored if {@link #getTarget()} is {@link GLES2#GL_TEXTURE_EXTERNAL_OES}.
+ * </p>
+ * <p>
* See the <a href="#perftips">performance tips</a> above for hints
* on how to maximize performance when using many Texture objects.
+ * </p>
+ * @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());
</pre>
*
+ * <p>
+ * Call is ignored if {@link #getTarget()} is {@link GLES2#GL_TEXTURE_EXTERNAL_OES}.
+ * </p>
+ * <p>
* See the <a href="#perftips">performance tips</a> above for hints
* on how to maximize performance when using many Texture objects.
- * @param gl TODO
+ * </p>
+ * @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);
+ }
}
/**