From 3edf24ba4fdca529b25e780c2b0996ff4237d950 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Mon, 1 Sep 2014 16:14:43 +0200 Subject: Bug 1017 - TextureIO.write(Texture, File) throws GLException Not a GL2 implementation on GL3 contexts _gl.getGL2() -> _gl.getGL2GL3() --- src/jogl/classes/com/jogamp/opengl/util/texture/TextureIO.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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. * + *

+ * Method required a {@link GL2GL3} {@link GLProfile#GL2GL3 profile}. + *

+ * * @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); -- cgit v1.2.3