Login  Register

Re: com.jogamp.graph.curve.opengl.TextRenderer without shader?

Posted by Sven Gothel on Aug 02, 2014; 8:41pm
URL: https://forum.jogamp.org/com-jogamp-graph-curve-opengl-TextRenderer-without-shader-tp4032687p4032693.html

On 08/02/2014 03:48 PM, aqd [via jogamp] wrote:
> Hello jogl devs!
>
> I'm trying to replace old TextRenderer with the curve one in WorldWind's
> SurfaceText, which renders text for each shape onto a tile texture and then
> apply the texture to virtual globe. The problem is that if I don't turn off
> shader, the rendering ignores current matrix (set for each shape inside the
> tile texture) and draws all text to the center of tile texture instead of the
> center of each shape.

Sorry, I cannot follow you.

>
> What does the shader do? If it has to be turned on, how can I fix the matrix?

The new graph shader ?

Depending on the mode,
it either renders curves directly into the framebuffer,
or utilizes some AA, e.g. renders into a 'bigger' FBO for VBAA (view based AA)
or using MSAA (not so good quality).

I assume you refer to a fixed point matrix you have via WW
and like to apply this to our graph renderer ?

In this case, you need to pass it explicitly, since graph uses
core OpenGL (ES2) only and manages it's own PMV matrix.

However, we have examples like MovieSimple, MovieCube etc,
which share a PMV matrix instance.

Best would be to analyze our current graph text renderer unit tests,
IMHO things should become more clear:
 com.jogamp.opengl.test.junit.graph.TestTextRendererNEWT10
   - Simple demo using TextRegionUtil

 com.jogamp.opengl.test.junit.jogl.demos.es2.av.MovieCube
   - Demo using TextRendererGLELBase
     within MovieCube's InfoTextRendererGLELBase

   - Sharing the PMV matrix

TextRendererGLELBase simply incorporates
TextRegionUtil and a RegionRenderer within an GLEventListener
while exposing some convenient state full text output like line counting.

TextRendererGLELBase may end up in a public API, currently it's in
the unit test (demo) space.

~Sven



signature.asc (894 bytes) Download Attachment