Login  Register

Re: Where did graph.curve.opengl.TextRenderer go ?

Posted by Sven Gothel on Jun 09, 2015; 8:34pm
URL: https://forum.jogamp.org/Where-did-graph-curve-opengl-TextRenderer-go-tp4034611p4034625.html

On 06/09/2015 05:56 PM, Lili [via jogamp] wrote:
> I got it to work with enabled depth test somehow.
> Now I added another 2D obeject to my scene that uses my shaders.
> I can't figure out how to make both the text and the other 2D object to show
> up. With the old text render I used
> *gl.glUseProgram(shaderState.shaderProgram().program())* and
> *gl.glUseProgram(myOwnProgram)* to switch back and forth. However, it doesn't
> work now. RenderState.IsShaderProgramInUse() give me FALSE. I don't understand
> what program to use.

Currently it seems that integration of user GL code
w/ RegionRenderer and RenderState is poorly supported,
sorry about that!

A workaround would be to use
  RenderState.setShaderProgram(final GL2ES2 gl, final ShaderProgram spNext) {..}
which will notify the RenderState about the ShaderProgram switch.

We shall have an API entry either to simply flush RenderState's
current state or add a flag to _force_ the 'setShaderProgram(..)' switch.

Maybe both will be beneficially.

Would you be so kind to add a bug report w/ this knowledge?
In case you like to make this change yourself, pls go ahead
and offer a git patch (mail, your-repo/branch, ..) w/ a small unit test.

Great to see graph gets adopted!

Thank you!

~Sven



signature.asc (828 bytes) Download Attachment