Bug 975 - AWTTextureIO.newTextureData() should not require a current context
AWTTextureIO.newTextureData() should not require a current context
Status: NEW
Product: jogl
Classification: Unclassified
Component: source
1
PC All
: P1 enhancement
: ---
Assigned To: Sven Gothel
http://www.javagaming.org/index.php?t...
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-28 00:01 UTC by mbien
Modified: 2009-08-28 00:11 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mbien 2009-08-28 00:01:57 UTC
It is currently not possible to create TextureData outside the gl thread.

    public static void main(String[] args) throws MalformedURLException, IOException {
        BufferedImage image = ImageIO.read(new URL("http://www.google.com/intl/en_ALL/images/logo.gif"));
        AWTTextureIO.newTextureData(image, false);
    }

throws

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.awt.AWTTextureIO.newTextureDataImpl(AWTTextureIO.java:117)
        at com.sun.opengl.util.texture.awt.AWTTextureIO.newTextureData(AWTTextureIO.java:59)
        at org.yourorghere.SimpleJOGL2.main(SimpleJOGL2.java:35)