Text rendering, best solution for my case

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

Text rendering, best solution for my case

elect
So, I need to render some text labels, where basically some text is surrounded by a simple frame..

I need this to rely somehow on some geometry, in order to apply the billboard technique

Moreover, I also need the right depth values for the depth peeling

Which would be the best solution for that?

I thought to render externally in java or so on and just create a texture..

Is there anything better and/or any tool for text that suits my need?

I didnt find anything recent useful, everything looks outdated..
Reply | Threaded
Open this post in threaded view
|

Re: Text rendering, best solution for my case

gouessej
Administrator
Have you tried the latest build-in TextRenderer (shader based)?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Text rendering, best solution for my case

andrei
This post was updated on .
Are there any good examples for the new TextRenderer? I've looked at the tests in the official repo but they seem to use classes that do not come with the latest release (? at least for example I do not have a TextRegionUtil, nor does my RenderState offer a constructor with just one parameter).

I'm having a hard time getting text rendering done, is there a simple step by step overview?


Here's what I tried: https://gist.github.com/arya-s/10968151
Reply | Threaded
Open this post in threaded view
|

Re: Text rendering, best solution for my case

gouessej
Administrator
Are you sure you use JOGL 2.1.5-01? There is no autobuild available with the very latest changes :s
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Text rendering, best solution for my case

Sven Gothel
Administrator
On 04/17/2014 02:45 PM, gouessej [via jogamp] wrote:
> Are you sure you use JOGL 2.1.5-01? There is no autobuild available with the
> very latest changes :s

http://jogamp.org/deployment/archive/master/gluegen_785-joal_531-jogl_1247-jocl_952-signed/

~Sven



signature.asc (894 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Text rendering, best solution for my case

gouessej
Administrator
Sven Gothel wrote
On 04/17/2014 02:45 PM, gouessej [via jogamp] wrote:
> Are you sure you use JOGL 2.1.5-01? There is no autobuild available with the
> very latest changes :s

http://jogamp.org/deployment/archive/master/gluegen_785-joal_531-jogl_1247-jocl_952-signed/
Thanks, I should have found it...
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Text rendering, best solution for my case

Sven Gothel
Administrator
In reply to this post by andrei
On 04/17/2014 10:39 AM, andrei [via jogamp] wrote:
> Are there any good examples for the new TextRenderer? I've looked at the tests
> in the official repo but they seem to use classes that do not come with the
> latest release (? at least for example I do not have a TextRegionUtil, nor
> does my RenderState offer a constructor with just one parameter).
>
> I'm having a hard time getting text rendering done, is there a simple step by
> step overview?

Pls load jogl + sources incl. unit tests into your fav. IDE.
i.e. use the source git repo and build it yourself.

Instead of building jogl, if that is a problem,
you may can use the latest build and source-zip files
_plus_ the sources from the git repository.

Then you can check the backtrace/references
of TextRegionUtil .. and you will see the unit tests
and how they use it. IMHO .. not really that hard.

Of course, since we work on Graph/UI now,
things are in a flux until 2.2 is reached.

Note to myself: We need to add a jogl-test-src.zip file,
allowing users to browse through the unit tests itself!

Hope it helps a bit.

~Sven



signature.asc (894 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Text rendering, best solution for my case

andrei
Thanks, that helped me a bit but there's still a few questions left open for me. Are there test files that render text over existing context, e.g. GearsES9NL69?

I got plain text rendering to work like in the tests: https://gist.github.com/anonymous/11134970

But when I put the code into my main application, everything is black. Obviously some states are set that I don't know how to unset after the text is rendered. Any pointers?
Reply | Threaded
Open this post in threaded view
|

Re: Text rendering, best solution for my case

Sven Gothel
Administrator
On 04/21/2014 09:29 AM, andrei [via jogamp] wrote:

> Thanks, that helped me a bit but there's still a few questions left open for
> me. Are there test files that render text over existing context, e.g.
> GearsES9NL69?
>
> I got plain text rendering to work like in the tests:
> https://gist.github.com/anonymous/11134970
>
> But when I put the code into my main application, everything is black.
> Obviously some states are set that I don't know how to unset after the text is
> rendered. Any pointers?
(master branch)

RegionRenderer.enable(...)

Pls track usage of this method,
and the RegionRenderer.create(..) factory method
to pass the enable/disable GLCallbacks.

Examples:
  - com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube
  - com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieSimple
  - com.jogamp.opengl.test.junit.jogl.acore.GLReadBuffer00Base <- TestGLReadBuffer01GLWindowNEWT

If you have more suggestions or ideas to enhance the WIP model,
pls join our Graph/UI effort.

Hope it helps.

Cheers, Sven



signature.asc (894 bytes) Download Attachment