Login  Register

Re: JOGL - High performance text rendering

Posted by Sven Gothel on Oct 09, 2011; 4:05pm
URL: https://forum.jogamp.org/JOGL-High-performance-text-rendering-tp1319060p3407597.html

On Sunday, October 09, 2011 04:04:07 PM Rbajter [via jogamp] wrote:

>
> Hi,
> I just got a little time to look at the new text rendering api in jogl. Btw,
> the demos look great. :) I'm really exited to try and get this working in my
> app. I've scoured the demo code and think I have all the bits required to
> make it work. Before I start fiddling with a test app I just wanted to check
> that I haven't missed anything and also ask a few questions.
>
> Below is what I think are the relevant classes and calls:
>
>
>
> 1. What are render modes? And why should I care?
For now, just don't care - pass 0.
You could use 2-pass mode w/ texSize etc (see demo's w/ '02') .. however,
it's not thoroughly done yet, ie finding the texSize for the FBO.
This also doesn't work well on Tegra2 (mobile).

> 2. Apparently I can set a projection directly on the text renderer. Why?
> Can't I just use whatever projection I already have set up?
We need it to advance to the next position .. characters ..
But you are free to [re-]use the matrix, I guess it's accessible.

> 3. Some calls to the renderer are done with a null GL context. What does
> that mean?
Some matrix op's are done in a batch, so only the last one passes the GL ctx,
which then updates the GLSL uniform data.

> 4. In the drawString3D call there is a texture size argument for multipass
> rendering. What size should I set and when is it used?
See above (mode) .. let's ignore this for now :)

>
> Now what would be really cool is a blow-by-blow minimal usage example, maybe
> posted in the blog, but I guess that is just wishful thinking. :)

No, you are right.
We started with such (Rami did) .. then I blew it up to the current complex one.

We should bring a 'one file' demo back, right.
Maybe you like to contribute yours ?
[Since it's always better to write these docs as an 'outsider']
I would love to check in your demo/unit test.

> Anyway, thanks for all the great work!

Thank you for testing.

~Sven

>
> //Johan
>