www.jpct.net

jPCT - a 3d engine for Java => Support => Topic started by: Minigame on November 28, 2012, 07:28:33 am

Title: string on bill board
Post by: Minigame on November 28, 2012, 07:28:33 am
I've gotten the basic setup for name tags implemented into my client application:
(http://i.troll.ws/db67e7c9.png)

My goal is to generate name textures, and set them as the bill board texture. I'm not sure how to approach so tips for something efficient would be greatly appreciated.
Title: Re: string on bill board
Post by: KittenKoder on November 28, 2012, 07:38:17 am
Best option is to create a small texture for each, and paint the name on using Java.

If you use an ITextureEffect you can dynamically change the name without recreating the texture, it works pretty well that way. I use a dynamic texture class that maintains a BufferedImage and applies an ITextureEffect when the text is changed, which I use a BufferedImage, loaded png, for the text font. for something that has an "unknown" number you may just want to do blitting, to conserve memory.
Title: Re: string on bill board
Post by: Disastorm on December 01, 2012, 03:42:28 am
The GLFont blitting thing Raft made is pretty cool:

http://www.jpct.net/forum2/index.php/topic,1074.0.html