First of all, JOGL is great.
Second, I’m glad JOGL is now capable of rendering text!
However, I’m experiencing serious errors while rendering text. My application draws labels on a
dragable canvas. Depending on which labels are currently visible in the viewport, some labels
are drawn correct, some are shown as black rectangles, and some others are simply not visible
(see screen shot). Occasionally, the application even crashes (see below and attached error log).
`
An unexpected error has been detected by Java Runtime Environment:
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x690f6f9d, pid=3056, tid=2144
Java VM: Java HotSpot™ Client VM (1.6.0-b105 mixed mode, sharing)
Problematic frame:
C [atioglxx.dll+0xf6f9d]
An error report file with more information is saved as hs_err_pid3056.log
`
I’m using JDK6, JOGL 1.1 rc3, WindowsXP, ATI Radeon 9600 Pro (latest drivers). The rendering
code is basically as follows:
// *** code from somewhere in the display method ***
gl.glDisable(GL.GL_DEPTH_TEST);
gl.glDisable(GL.GL_LIGHTING);
TextRenderer textPlain = new TextRenderer(plainFont, true, true);
textPlain.beginRendering(glDrawable.getWidth(), glDrawable.getHeight());
TextRenderer textLarge = new TextRenderer(largeFont, true, true);
textLarge.beginRendering(glDrawable.getWidth(), glDrawable.getHeight());
// Iterate over all nodes
for (Node labelNode : nodeList.keySet()) {
//*
// some code to compute label positions
//
// Draw either plain or large label
if (drawPlainLabel) {
textPlain.setColor(0.3f, 0.3f, 0.3f, 1f);
textPlain.draw(labelNode.getLabel(), (int) x, (int) (glDrawable.getHeight() - y));
}
else {
textLarge.setColor(0, 0, 0, 1);
textLarge.draw(labelNode.getLabel(), (int) x, (int) (glDrawable.getHeight() - y));
}
textPlain.endRendering();
textPlain.dispose();
textLarge.endRendering();
textLarge.dispose();
gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA); // Restore blend function
Any help regarding this issue is very much appreciated. Thanks in advance!!!