Render text

Started by snapsen, February 15, 2012, 20:01:04

Previous topic - Next topic

snapsen

Hi All

I'm a newbie to OpenGl, in the process of creating an applet to illustrate the computation of some miter and bevel angles when cutting wood (for another application). Found a lwjgl gears applet which convinced me to use lwlgl (don't know if this was the correct decision, but i had to start somewhere). Apart from the expected startup problems (like normals pointing in "funny" directions and such) have been moving along pretty well. Now i'm trying to render some text in the 3d space, and i'm failing miserably. Found an example of this on potatoland which renders text on some spheres. Works fine in a console app. I then tried to gen these to work in my applet, but i'm unable to get any text in my applet. Ended up creating an applet with just the sphere (which displays fine), and the text. Can anyone give me a hint on how to achieve this, i'll be grateful.

br
Karsten.

kappa

Try Slick-Util, instructions here.

snapsen

Doh....

As stated, i'm a new to opengl. Tried using JOGL as it has a TextRenderer class. Turns out that the quality is not as good as expected. Could not get Napier code to work under JOGL either.

Textures needs to be enabled.

      GL11.glEnable(GL11.GL_TEXTURE_2D);   // be sure textures are on


Working fine now
Thanks
Karsten.