Font Colors with OpenGL ES

Apprentice
Posts: 11
Joined: 2008.09
Post: #1
Hello there. From all of the posts and information I've been able to find it seems like using the Texture2D initWithString method is the best way for displaying text. It seems to work fine (at least in the CrashLanding demo) but it only lets you display white. For my project I'll have to have the same string be able to switch colors on the fly (I'm working on the menu screens) but can't find any functionality for that. Does anyone have any ideas on how to change colors? All I can think of is somehow drawing it over a colored piece of geometry and letting the color show through, but I'm not certain. Any help is appreciated.
Mike
Quote this message in a reply
Member
Posts: 338
Joined: 2004.07
Post: #2
You can bind the texture, and then map it to a colored quad for the effect you want.

Justin Ficarrotta
http://www.justinfic.com
"It is better to be The Man than to work for The Man." - Alexander Seropian
Quote this message in a reply
Apprentice
Posts: 11
Joined: 2008.09
Post: #3
Cool, that's what I thought. Turns out we're just gonna use a built in UITextField for all our stuff but that's still good to know when we get fancier with our fonts. Thanx again.
Quote this message in a reply
Apprentice
Posts: 9
Joined: 2008.09
Post: #4
JustinFic Wrote:You can bind the texture, and then map it to a colored quad for the effect you want.

Can you show a coded example for us newbie lot. Wacko
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  opengl es font textures? cool mr croc 0 2,392 Aug 17, 2009 04:52 AM
Last Post: cool mr croc