Re: TextRenderer - my text won't show
Posted by
chakie on
Aug 08, 2013; 10:49am
URL: https://forum.jogamp.org/TextRenderer-my-text-won-t-show-tp4029291p4029760.html
I've also been trying to render text, but with no luck so far. The docs I've followed are from:
http://jogamp.org/deployment/jogamp-next/javadoc/jogl/javadoc/com/jogamp/opengl/util/awt/TextRenderer.htmlHowever, these docs don't mention any TextRenderer.create(rs, 0) method as used in the first post in this thread. Also my TextRenderer implementation doesn't have such a method. Perhaps I'm using an obsolete version of JOGL? When I run code using the above docs as a base I get:
Exception in thread "main-FPSAWTAnimator-Timer0" java.lang.RuntimeException: javax.media.opengl.GLException: Not a GL2 implementation
Caused by: javax.media.opengl.GLException: Not a GL2 implementation
at javax.media.opengl.DebugGL3.getGL2(DebugGL3.java:86)
at com.jogamp.opengl.util.awt.TextRenderer.beginRendering(TextRenderer.java:650)
at com.jogamp.opengl.util.awt.TextRenderer.beginRendering(TextRenderer.java:405)
at com.jogamp.opengl.util.awt.TextRenderer.beginRendering(TextRenderer.java:384)
I use GL3. The GL3bc profile is apparently not available either, and I'd prefer to stick to modernish features. Same error when using begin3DRendering() and end3DRendering().
I've also found posts like this:
http://forum.jogamp.org/curve-TextRenderer-GL3-couldn-t-link-program-td4028852.htmlthat also use this new API. The JOGL version I use is 2.0.2-rc12 as picked up through Maven and some repository mirror (not under my control).
Looking at a unit test I just found:
https://github.com/sgothel/jogl/blob/master/src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextRendererListenerBase01.javaI see that the TextRenderer is in fact coming from com.jogamp.graph.curve.opengl.TextRenderer. I do have that class though, so I assume that I'm looking at way obsolete docs here. Perhaps this question then boils down to: are there any recent docs online anywhere?