Issue Details (XML | Word | Printable)

Key: JOGL-378
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: jogl-issues
Reporter: qwerty999
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
jogl

TextureData incorrectly requires GL context

Created: 27/Aug/09 05:04 PM   Updated: 27/Aug/09 05:04 PM
Component/s: jogl
Affects Version/s: current
Fix Version/s: milestone 1

Time Tracking:
Not Specified

Environment:

Operating System: All
Platform: Macintosh


Issuezilla Id: 378
Tags:
Participants: jogl-issues and qwerty999


 Description  « Hide

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)



There are no comments yet on this issue.