Re: TextRenderer - my text won't show
Posted by
Deedee on
Aug 30, 2013; 5:18pm
URL: https://forum.jogamp.org/TextRenderer-my-text-won-t-show-tp4029291p4029930.html
I am now trying to extract some ideas from this thread
http://forum.jogamp.org/TextRenderer-and-VAOs-td4029530.htmlI managed to make my text appear with the rest of my objects but it's not quite right yet. Some of the other objects look like they don't accept their color correctly (or the normal vector) because they show as being black. I tried to use NewtCanvasAWT instead of GLCanvas which didn't really help.
My code uses one program for 2D objects, one for 3D objects and one for texture objects. Each program has a pair of vertex and fragment shaders that it uses. I feel like the problem is switching back and forth between the different programs. I am not sure if simply calling gl.glUseProgram(x) or gl.glUseProgram(Y) is enough. Maybe I need also bind/unbind something.
I'll keep trying to change little things here and there to see if I can understand why it behaves the way it does but I think I'm done with this project for now. I'll resume work on Monday.
PS: Yeah the font is pretty ugly. I now use FontFactory.UBUNTU instead of FontFactory.JAVA and it looks much better.