Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  3D and bitmap text in JOGL  (Read 1683 times)
0 Members and 2 Guests are viewing this topic.
Offline shaddam_IV

Jr. Member
**

Posts: 73


Java makes me happy the way C# doesn't!


« on: 2003-12-01 21:57:00 »

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

There are 10 kinds of people in the world.  Those that understand binary and those that don't.
Offline pepijnve

Sr. Member
**

Posts: 379
Medals: 1


Java games rock!


« Reply #1 on: 2003-12-02 02:01:47 »

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.
Offline gregorypierce

JGO Strike Force
***

Posts: 905


I come upon thee like the blue screen of death....


« Reply #2 on: 2003-12-02 12:24:55 »

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.

http://www.gregorypierce.com

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
Games published by our own members! Go get 'em!
Offline pepijnve

Sr. Member
**

Posts: 379
Medals: 1


Java games rock!


« Reply #3 on: 2003-12-03 01:13:15 »

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.
Offline gregorypierce

JGO Strike Force
***

Posts: 905


I come upon thee like the blue screen of death....


« Reply #4 on: 2003-12-03 13:06:05 »

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.

http://www.gregorypierce.com

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
Offline tom

JGO Neuromancer
****

Posts: 1113
Medals: 5



« Reply #5 on: 2003-12-03 17:13:52 »

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

Offline gregorypierce

JGO Strike Force
***

Posts: 905


I come upon thee like the blue screen of death....


« Reply #6 on: 2003-12-03 21:08:07 »

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.

http://www.gregorypierce.com

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
Offline pepijnve

Sr. Member
**

Posts: 379
Medals: 1


Java games rock!


« Reply #7 on: 2003-12-04 01:01:49 »

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.
Offline tom

JGO Neuromancer
****

Posts: 1113
Medals: 5



« Reply #8 on: 2003-12-04 07:44:19 »

ok. I see Smiley

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 Smiley

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.

Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.096 seconds with 20 queries.