TextRenderer using GL3 context

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

TextRenderer using GL3 context

PJDM
I'm attempting to draw text using TextRenderer as per the TextRenderer Javadoc. I'm using a GLCanvas with a GL3 context.

renderer.BeginRendering() throws "javax.media.opengl.GLException: Not a GL2 implementation".

How can I do this from a GL3 context?

JOGL 2.0-b23-20110303

Thanks.

PJDM
Reply | Threaded
Open this post in threaded view
|

Re: TextRenderer using GL3 context

gouessej
Administrator
This post was updated on .
Hi!

Use a GL3 backward compatible context and it will work because GL3bc and GL4bc extends the interface GL2. If you really want to use GL3 forward compatible context, you have to use something else. Rami and Sven have written an API to draw some text with shaders, tehy could talk about it better than me.

Anyway, if you want, I can have a look at the source code of TextRenderer to see whether I can modify it a bit to make it work in your case but I'm not sure it is possible. Best regards.

Edit.: In some places in the source code of TextRenderer, GL2 can be replaced by GL2GL3. I advise you to copy/paste TextRenderer and check it by yourself. Otherwise, look at com.jogamp.graph.font.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: TextRenderer using GL3 context

PJDM
Thanks for the information. I don't really want to use GL3bc: I'm trying to stay away from the older versions.

I was hoping that the changes mentioned at http://forum.jogamp.org/TextRenderer-td2011861.html had been made. Oh well.

PJDM
Reply | Threaded
Open this post in threaded view
|

Re: TextRenderer using GL3 context

gouessej
Administrator
Ok. Then, do you still want to use TextRenderer?
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: TextRenderer using GL3 context

PJDM
OK, I've tried GL3bc with begin3DRendering(): it causes some drastic changes to the other objects in the display. Presumably this is because of array buffer bindings and/or other state changing. Also, the text only appears for a single draw(), subsequent draw()s display nothing.

I'll continue to experiment.

Thanks.

PJDM
Reply | Threaded
Open this post in threaded view
|

Re: TextRenderer using GL3 context

gouessej
Administrator
Hi!

Sorry for the stupid question, do you use end3DRendering too? I used GL4bc with a NVIDIA Quadro FX several times without any problem.
Julien Gouesse | Personal blog | Website