aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/com/jogamp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-09-01 16:14:43 +0200
committerSven Gothel <[email protected]>2014-09-01 16:14:43 +0200
commit3edf24ba4fdca529b25e780c2b0996ff4237d950 (patch)
treed71b5f1057ade976fe27dc4e54d29e505bca9107 /src/jogl/classes/com/jogamp
parentcff998436b4e09acd0c1fc20dbf606ce38b57ff3 (diff)
Bug 1017 - TextureIO.write(Texture, File) throws GLException Not a GL2 implementation on GL3 contexts
_gl.getGL2() -> _gl.getGL2GL3()
Diffstat (limited to 'src/jogl/classes/com/jogamp')
-rw-r--r--src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
index 19f2fc05b..1f5b2613e 100644
--- a/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
+++ b/src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java
@@ -575,6 +575,10 @@ public class TextureIO {
* when it is written to disk, regardless of whether the underlying
* file format supports multiple mipmaps in a given file.
*
+ * <p>
+ * Method required a {@link GL2GL3} {@link GLProfile#GL2GL3 profile}.
+ * </p>
+ *
* @throws IOException if an error occurred during writing or no
* suitable writer was found
* @throws GLException if no OpenGL context was current or an
@@ -590,7 +594,7 @@ public class TextureIO {
if (!_gl.isGL2GL3()) {
throw new GLException("Implementation only supports GL2GL3 (Use GLReadBufferUtil and the TextureData variant), have: " + _gl);
}
- final GL2GL3 gl = _gl.getGL2();
+ final GL2GL3 gl = _gl.getGL2GL3();
texture.bind(gl);
final int internalFormat = glGetTexLevelParameteri(gl, GL.GL_TEXTURE_2D, 0, GL2GL3.GL_TEXTURE_INTERNAL_FORMAT);