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

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

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


Operating System: All
Platform: Macintosh

Issuezilla Id: 378
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 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" No OpenGL context current on this thread
at com.sun.opengl.util.texture.awt.AWTTextureData.createFromImage(
at com.sun.opengl.util.texture.awt.AWTTextureData.<init>(
at com.sun.opengl.util.texture.TextureIO.newTextureDataImpl(
at com.sun.opengl.util.texture.TextureIO.newTextureData(

There are no comments yet on this issue.