Where did graph.curve.opengl.TextRenderer go ?

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

Where did graph.curve.opengl.TextRenderer go ?

Lili
Hello,

I updated my libraries to the JOGL March 2015 version and com.jogamp.graph.curve.opengl.TextRenderer doesn't exist any more . Did it move?

I tried the alternative (com.jogamp.opengl.util.awt.TextRenderer) but I can't get it to work with GL3.

Thank you for your help.
Reply | Threaded
Open this post in threaded view
|

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

Xerxes Rånby
TextRenderer has been replaced with TextRegionUtil

https://jogamp.org/bugzilla/show_bug.cgi?id=802
API Changes:
      - OutlineShape, Region, ...: See above
      - Removed TextRenderer, GlyphShape and GlyphString: Redundant
      - Added TextRendererUtil to produce the Region from CharSequence
      https://jogamp.org/git/?p=jogl.git;a=commitdiff;h=c3621221b9a563495b4f54fe60e18e8db8cc57fb

https://jogamp.org/bugzilla/show_bug.cgi?id=801- Cleanup Graph API, Remove Redundancies.
      - Bug 801: Graph TextRenderer Cleanup Part-4: Text[Render->Region]Util API: Better separation of cached and uncached regions
        https://jogamp.org/git/?p=jogl.git;a=commit;h=67ec86e539a3db0d06e5cc3550db453589594384
Reply | Threaded
Open this post in threaded view
|

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

Lili
I see. Thank you Xerxes Rånby!

I tried to run a very simple example. It seems to work fine until I enable the depth test. When  I enable it the text doesn't show. It doesn't give me any errors.
Reply | Threaded
Open this post in threaded view
|

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

Sven Gothel
Administrator
On 06/08/2015 06:47 PM, Lili [via jogamp] wrote:
> I see. Thank you Xerxes Rånby!
>
> I tried to run a very simple example. It seems to work fine until I enable the
> depth test. When  I enable it the text doesn't show. It doesn't give me any
> errors.

depth is tricky, since we talk about an approx. 2D figure,
which then shall be upfront all other elements (z-axis)
and be rendered at last (back-to-front).
Following the above .. it does work, see our UI test renderer,
which sorts all elements by its z-axis.

Our UI test disables depth for all opaque elements
which are transparent.

~Sven




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

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

Lili
I got it to work with enabled depth test somehow.
Now I added another 2D object 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.

Reply | Threaded
Open this post in threaded view
|

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

Sven Gothel
Administrator
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
Reply | Threaded
Open this post in threaded view
|

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

Lili
This post was updated on .
Thank you so much Sven. Your workaround solution works

I submitted the bug report.
Reply | Threaded
Open this post in threaded view
|

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

Sven Gothel
Administrator
On 06/11/2015 03:39 PM, Lili [via jogamp] wrote:
> Thank you so much Sven. Your workaround solution works
These are excellent news - thank you for sharing and testing!

Maybe you and your team can help fixing outstanding graph issues:

- <http://jogamp.org/wiki/index.php/SW_Tracking_Report_Objectives_for_the_release_2.3.3#Graph>

  - <http://jogamp.org/bugzilla/showdependencytree.cgi?id=803&hide_resolved=0>
  - <http://jogamp.org/bugzilla/showdependencytree.cgi?id=1064&hide_resolved=0>

>
> How do I file a bug report?

http://jogamp.org/wiki/index.php/Jogl_FAQ#Bugreports_.26_Testing
https://jogamp.org/bugzilla/

As mentioned earlier, pls inline all knowledge of this communication
to the bugs description - thank you!

~Sven


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

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

Lili
I will give it a try
Reply | Threaded
Open this post in threaded view
|

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

Lili
I'm back with the same problem unfortunately. I am now using a new computer (Ubuntu 15.04 with NVidia GTX 970). I moved my code from the old Mac computer to the new one and the workaround solution is giving me a runtime error . I get "com.jogamp.opengl.GLException: Program is not linked" for this line of code
renderState.setShaderProgram(gl, shaderProg);

Anyone know of a way I can trick it into working?

Thank you
Reply | Threaded
Open this post in threaded view
|

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

Sven Gothel
Administrator
On 08/22/2015 12:49 AM, Lili [via jogamp] wrote:
> I'm back with the same problem unfortunately. I am now using a new computer
> (Ubuntu 15.04 with NVidia GTX 970). I moved my code from the old Mac computer
> to the new one and the workaround solution is giving me a runtime error . I
> get "com.jogamp.opengl.GLException: Program is not linked" for this line of code
> renderState.setShaderProgram(gl, shaderProg);
>
> Anyone know of a way I can trick it into working?
>

Orthogonal issue, your shader code doesn't comply w/ ... (something).

If you use ShaderCode etc, you may want to set
property 'jogl.debug.GLSLCode' showing you the error line .. etc

Also see:

<http://jogamp.org/wiki/index.php/How_to_write_cross_GLProfile_compatible_shader_using_JOGL>

~Sven



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

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

Lili
Thank you Sven Gothel. I will try that but I'm wondering why it's a problem on one computer and not on another.