Bug 998 - TextRenderer incorrectly requires openGL context
TextRenderer incorrectly requires openGL context
Status: NEW
Product: jogl
Classification: Unclassified
Component: source
: P5 enhancement
: ---
Assigned To: Sven Gothel
Depends on:
  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:


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

frc = textRenderer.getFontRenderContext();

then I get this exception:

javax.media.opengl.GLException: No OpenGL context current on this

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

GL2 gl = GLContext.getCurrentGL().getGL2();

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.


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