Login  Register

jogl 2.0 build 270 GLException

Posted by bcothren on Jan 26, 2011; 7:02pm
URL: https://forum.jogamp.org/jogl-2-0-build-270-GLException-tp2356435.html

Up until today I've been using the following piece of code with build 223 with no problems...

                try {
                        floorTexture = TextureIO.newTexture(new File(filename), false);
                        floorTexture.setTexParameteri(GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);
                        floorTexture.setTexParameteri(GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
                } catch (IOException e) {
                        System.err.println("Error loading " + filename);
                }

I switched today to the latest autobuild, 270, and I'm now getting no texture showing up (it's all white).  When I turn on GL debugging, I see this error:

glGetError() returned the following error codes after a call to glTexImage2D(<int> 0xDE1, <int> 0x0, <int> 0x1907, <int> 0x2D0, <int> 0x2D0, <int> 0x0, <int> 0x80E0, <int> 0x1401, <java.nio.Buffer>): GL_INVALID_VALUE ( 1281 0x501),

And, when I turn on the trace, it shows me:

glTexImage2D(<int> 0xDE1, <int> 0x0, <int> 0x1907, <int> 0x2D0, <int> 0x2D0, <int> 0x0, <int> 0x80E0, <int> 0x1401, <java.nio.Buffer> null)Exception in thread "AWT-EventQueue-0-AWTAnimator-1" javax.media.opengl.GLException: javax.media.opengl.GLException: Thread[AWT-EventQueue-0,6,main] glGetError() returned the following error codes after a call to glTexImage2D(<int> 0xDE1, <int> 0x0, <int> 0x1907, <int> 0x2D0, <int> 0x2D0, <int> 0x0, <int> 0x80E0, <int> 0x1401, <java.nio.Buffer>): GL_INVALID_VALUE ( 1281 0x501),

This seems like it could be related to not setting GL_TEXTURE_MIN_FILTER to GL_LINEAR, but I have that.

Sorry, I know there's a better way to include code snippets, but I don't know how.

Any ideas?

Thanks,

bcothren