Posted by
Sven Gothel on
Jul 26, 2011; 1:12pm
URL: https://forum.jogamp.org/Which-JOGL-TextRenderer-should-I-use-tp3199861p3200277.html
On Tuesday, July 26, 2011 11:25:38 AM GiGurra [via jogamp] wrote:
>
> I have some questions about the TextRenderer(s) in JOGL 2.
> First of all I see there are two versions:
>
> com.jogamp.graph.curve.opengl.TextRenderer;
This is our new thing - disclaimer: API may change a bit.
> and
> com.jogamp.opengl.util.awt.TextRenderer; (this is the one I've been using)
We don't really do anything with this anymore .. (too slow, not res. independent)
>
> After starting to use VBOs for my geometry I've just profiled my jogl
> application and found out that now about 70% of time spent each openGL
> display call is in the TextRenderer.
> tr.draw3d(...)
> tr.flush()
> (I only make one begin3d/end3d-rendering per iteration so that is not a
> problem)
>
> In order to improve this I've thought of a few ways, but first of all I
> downloaded the jogl source, and I see that
> com.jogamp.graph.curve.opengl.TextRenderer; seems to be much shorter code
> and marked as HW-accellerated,
also marked as resolution independent.
> but it seems to take Gl2ES interfaces as
> input. Is it possible to somehow try this one even when using non-ES jogl
> profiles?
GL2 interface extends GL2ES2, so does GLES2, GL3, GL3bc, GL4, GL4bc.
Hence .. you can pass anything but GLES1.
>
> Is there a tutorial or example code somewhere on how to use this HW
> accellerated variant? I would like to see how it performs compared to the
> com.jogamp.opengl.util.awt.TextRenderer;
OFC ..
http://www.youtube.com/user/sgothel?blend=4&ob=5#p/u/0/Rqsu46ifMawhttp://jogamp.org/git/?p=jogl.git;a=blob;f=src/test/com/jogamp/opengl/test/junit/graph/demos/GPUTextNewtDemo01.java;h=b9a04549816e9707e04a8b592fe77bdfefa9069d;hb=HEAD.. same thing.
Further reading/intro to new curve rendering (incl. text):
http://jausoft.com/blog/2011/04/01/resolution-independent-gpu-accelerated-curve-font-rendering/ http://jausoft.com/blog/2011/04/01/res-gpu-curve-font-screencast/ http://ramisantina.com/blog/?p=73 http://ramisantina.com/blog/?p=98>
> Thanks,
> and sorry if any of my questions are dumb, I am not very good at openGL or
> JOGL :).
such questions can't be dumb
Cheers, Sven