JOGL2 Text drawing performance

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

JOGL2 Text drawing performance

gregirvine
Hi there.

I'm looking at the migration to JOGL2 and possible migration to GL3.2+ post-immediate mode GL.  We do a lot of text rendering and use the original GL style texture-based text which uses glCallLists to pring strings (after loading each character of the texture into a display list, etc).

I see in another thread there has been some "complaints" about performance about the TextRenderer so I wanted to see if there's been any progress.
(http://forum.jogamp.org/JOGL-High-performance-text-rendering-td1319060.html)

I also saw a suggestion to use the GLSL text rendering instead.  Is this going to have any significant performance improvement over the current TextRenderer?  I would also need to check on driver compatibility with Shaders with some existing hardware.

Any info would be greatly appreciated.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL2 Text drawing performance

gouessej
Administrator
Hi

You seem to wish to use the forward compatible context, don't you? Then, on such hardwares, shaders are supported.

The current TextRenderer (not the one using GLSL) works fine, several people complain about its performances but it works reasonably fast when used carefully and I reduced its memory footprint. It uses VBOs if they are supported.

You should stay away from display lists as their implementations are quite very bad on some hardwares (and good on some others) except if you target a very specific hardware and if you really know what you're doing.

You can use the new TextRenderer, the only "problem" is that it requires shader support.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL2 Text drawing performance

Greg
Thanks for the response.

When you say "used carefully" what do you mean?  The nature of my application is it can have thousands of unrelated 3-5 character words on the screen at once (just like a GIS application).

Is the TextRenderer GL2.0 compatible or does it use newer features?  I was considering running Compatibility mode but may not be able to.

Thanks for any further information.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL2 Text drawing performance

gouessej
Administrator
Hi

I worked on a GIS application in my previous job, I know what you mean. You should respect this way of using the previous TextRenderer:
http://forum.jogamp.org/JOGL-High-performance-text-rendering-tp1319060p3157747.html

The previous TextRenderer does not work on ES2 whereas the new TextRenderer does not work on OpenGL 1.x. I have never tested them with the forward compatible context and only Sven can confirm whether the new text renderer works with it. The previous TextRenderer does not support the forward compatible context as it uses some deprecated and/or removed features.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL2 Text drawing performance

Sven Gothel
Administrator
On Thursday, October 20, 2011 09:52:35 AM gouessej [via jogamp] wrote:

>
> Hi
>
> I worked on a GIS application in my previous job, I know what you mean. You
> should respect this way of using the previous TextRenderer:
> http://forum.jogamp.org/JOGL-High-performance-text-rendering-tp1319060p3157747.html
> http://forum.jogamp.org/JOGL-High-performance-text-rendering-tp1319060p3157747.html 
>
> The previous TextRenderer does not work on ES2 whereas the new TextRenderer
> does not work on OpenGL 1.x. I have never tested them with the forward
> compatible context and only Sven can confirm whether the new text renderer
> works with it. The previous TextRenderer does not support the forward
> compatible context as it uses some deprecated and/or removed features.

The new text renderer in graph works w/ everything GL2ES2,
ie. ES2, GL2, GL3, GL3bc, GL4, GL4bc, hence core and fwd - yes.

Even though it works nice,
we will change the API a bit to make it more comfortable.
Another 'warning': We sure miss some of he font metrics provided,
since we are not rendering it with a scanline (bitmapped) methodology.
So some font experts might not be satisfied.

Call for help: Whoever is a font expert and can help with
making the scanline font metrics available in the curved 'bezier' world
is asked to help us out in this regard.

~Sven
Reply | Threaded
Open this post in threaded view
|

Re: JOGL2 Text drawing performance

Greg
We also use our own bitmap fonts (as per the original font drawing methods) because we need to be fairly particular about the font.  I'm guessing the TextRenderer only uses existing system fonts and doesn't support bitmap fonts, so we'll need to more our existing text rendering to use VBO instead of display lists right?