3D and bitmap text in JOGL

Hi all,

What, if anything, are all of you doing to add 3D and/or bitmap text to your JOGL programs? Normally, this is an OS specific thing. How are you working around it?

It looks like GLUT might be a possible solution. If this is the case, do you have to distribute glut.dll with everything?

Thanks,
Shaddam IV

For bitmap text, I made a wrapper for AWT fonts, that renders each character into a separate bitmap. I then just use the technique described in chapter eight of the OpenGL programmer’s guide (cfr. section ‘Fonts and display lists’
For 3D text you could also use GLF. There’s a port of it in one of the nehe lessons. Lesson 15 IIRC.

How’d the bitmap/texture text work for you performance wise? I was considering adding that to my engine, but never got around to doing it - spending a lot of time working on tools.

I’m not sure about the performance, since I haven’t had time to benchmark it yet, but it seems ok.
I implemented the mosaic texture/quads technique too, but I wasn’t really happy with the quality I got from that, so I dropped it.

Yeah, I did the mosaic method and I wasn’t pleased with the limitations and the quality. That’s the system I have in place now, but I hate it. I used it to avoid texture memory fragmentation - that’s why I was curious about your performance.

what quility issues did you have with mosaic method? Don’t see why it should give any less quility than any other method.

Compositing all of the fonts into one big texture caused some issues when the resulting texture was broken up into mipmaps - halo’ing and such.

Tom: when I use the bitmaps (glBitmap, not textures) my text is very crisp. I was never able to get quite the same result using textures.

ok. I see :slight_smile:

I use the mosaic mothod I think. The font is created in adobe photoshop, then parsed inn and stored in a single texture with each character getting there own rectangle inside the texture. I guess it could be generated by using awt, but I wanted it to be flexible enough to support hand made bitmap fonts. And adobe does nice antialiasing :slight_smile:

It is used by my menus and overlays. I’ve limited the use of the font so that it is never scaled, and is drawn in screen space. I don’t use mipmapping and I disable all filtering. I also make sure that it is properly aligned with the screen, so that the texture is mapped 1:1 to the screen. If I did not do this it looked like crap, because it got scaled and mangled.

But I agree that this method is not an option when using mipmaps.