---- Reported by qwerty999 2009-08-27 17:04:52 ---- Hi, in JOGL2 there is an issue with creating a TextureData. TextureData for some reason requires the GL context to be available. But the whole point of having TextureData was to separate texture preparation from the GL context. You can see for instance in the class AWTTextureData.java one method requires an open GL context simply to determine the GLProfile. GLProfile glp = GLContext.getCurrentGL().getGLProfile(); if (glp.isGL2()) { ... } So, calling a method via the TextureIO class such as: TextureIO.newTextureData(myFile, false, null); will throw this exception: Exception in thread "main" javax.media.opengl.GLException: No OpenGL context current on this thread at javax.media.opengl.GLContext.getCurrentGL(GLContext.java:159) at com.sun.opengl.util.texture.awt.AWTTextureData.createFromImage(AWTTextureData.java:173) at com.sun.opengl.util.texture.awt.AWTTextureData.<init>(AWTTextureData.java:102) at com.sun.opengl.util.texture.spi.awt.IIOTextureProvider.newTextureData(IIOTextureProvider.java:69) at com.sun.opengl.util.texture.TextureIO.newTextureDataImpl(TextureIO.java:765) at com.sun.opengl.util.texture.TextureIO.newTextureData(TextureIO.java:180) --- Bug imported by sgothel@jausoft.com 2010-03-24 07:51 EDT --- This bug was previously known as _bug_ 378 at https://jogl.dev.java.net/bugs/show_bug.cgi?id=378
*** Bug 380 has been marked as a duplicate of this bug. ***
Moved to JOGL2 ..
git: 8b8e270788b50636e48ee17cc9e5fc8f29d44f5c Solution: Pending data initialization if GL dependencies, see git log. Also: Added JUNIT tests (compile and run) in JOGL.
git: def4bf0d2f6ff9bf77418d26807bdcb187a3b033 forgot to check-in the tests ..