Bug 998 - TextRenderer incorrectly requires openGL context
TextRenderer incorrectly requires openGL context
Status: NEW
Product: jogl
Classification: Unclassified
Component: source
1
PC Mac OS
: P5 enhancement
: ---
Assigned To: Sven Gothel
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-08-31 19:32 UTC by spiraljetty
Modified: 2009-08-31 19:32 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description spiraljetty 2009-08-31 19:32:54 UTC
Hi, this is similar to the the TextureData bug I think. If I innocently
try to grab the fontRenderContext for some TextRenderer like so

[code]
frc = textRenderer.getFontRenderContext();
[/code]

then I get this exception:

[code]
javax.media.opengl.GLException: No OpenGL context current on this
thread
[/code]

The actual issue occurs at line 617 of
com.sun.opengl.util.awt.TextureRenderer.init(int w, int h), which is:

[code]
GL2 gl = GLContext.getCurrentGL().getGL2();
[/code]

Yet the GL2 variable "gl" is not actually used in the method anywhere!

There seem to be a number of cases where the getCurrentGL() is called
unnecessarily which is forcing everything to be processed in the
display loop.

-Angus

(ps, sorry i posted this twice-- once as an email, and then realized there was an issue tracker)