Drawing Text With OpenGL ES?
For my next game I'm trying to take presentation up a notch or seven. One of the things I'm looking at is my process of text rendering. For Juggler I used a UILabel on top of my EAGLView which seems to work just fine. However my next game is a bit more graphically intensive and the docs warn against mixing and matching OpenGL ES and the native rendering as it can cause performance and memory issues.
So all that out of the way, what is the generally used method of text rendering in OpenGL ES? Is there a tool out there to generate the font bitmap and provide me with the runtime classes? Or is it a lot of reinventing the wheel?
Edit: D'oh! There's a thread with the exact same name a page or two back: http://idevgames.com/forum/showthread.php?t=15453. My bad.
Edit 2: Looks like I need some Texture2D class from Apple. I've downloaded the GLSprite, GLPaint, and GLGravity samples but none seem to have this class. That's all I see when I choose the OpenGL ES filter in the samples area. Is there some other location I go to to get this class?
So all that out of the way, what is the generally used method of text rendering in OpenGL ES? Is there a tool out there to generate the font bitmap and provide me with the runtime classes? Or is it a lot of reinventing the wheel?
Edit: D'oh! There's a thread with the exact same name a page or two back: http://idevgames.com/forum/showthread.php?t=15453. My bad.
Edit 2: Looks like I need some Texture2D class from Apple. I've downloaded the GLSprite, GLPaint, and GLGravity samples but none seem to have this class. That's all I see when I choose the OpenGL ES filter in the samples area. Is there some other location I go to to get this class?
I think the crash lander app has the Texture2D class in. I just looked and it no longer seems to be up there for some reason?
I believe a few of the earlier code examples (Crash Lander being one) are no longer provided by Apple since the 2.2 update. Apple says all the code available in those examples is now available in different code samples but I'm not sure that's true of the Texture2D class, at least I haven't been able to find it and I only downloaded the SDK after 2.2 was released. Someone esle here might be able to post it though.
As an aside - I also read Apple have said the sound code available in Crash Lander is no longer stable on 2.2, I suspect that is part of the reason for it being removed.
As an aside - I also read Apple have said the sound code available in Crash Lander is no longer stable on 2.2, I suspect that is part of the reason for it being removed.
Well crud. If anyone happens to have the Texture2D class laying around and feels so compelled, my email address is nick@gravelyn.com.
I just sent a project to you.
I need it to: mxclouti@gmail.com
Thanks.
Thanks.
If you're looking for the Texture2D class, it's available as part of the cocos2d-iphone project on Google Code:
http://code.google.com/p/cocos2d-iphone/...n242&r=242
http://code.google.com/p/cocos2d-iphone/...n242&r=242
They're also available as part of the download files for Chapter 12 of Dave Mark and Jeff LaMarche 'Beginning iPhone Development' book:
http://iphonedevbook.com/
http://code.google.com/p/cocos2d-iphone/...n242&r=242
http://code.google.com/p/cocos2d-iphone/...n242&r=242
They're also available as part of the download files for Chapter 12 of Dave Mark and Jeff LaMarche 'Beginning iPhone Development' book:
http://iphonedevbook.com/
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| OpenGL Cube drawing: VBOs, instanced geometry, octrees | Symbol$ | 5 | 6,007 |
Dec 23, 2011 01:43 PM Last Post: Skorche |
|
| Drawing menu versus drawing game | johncmurphy | 4 | 3,673 |
Jan 6, 2010 09:14 AM Last Post: AnotherJake |
|
| OpenGL ES : Drawing Text... | savage | 8 | 8,047 |
Jan 4, 2010 08:59 PM Last Post: alerus |
|
| openGL n00b looking for FBO drawing examples or direction | auptown | 5 | 5,631 |
Nov 4, 2009 02:16 AM Last Post: Eskema |
|
| Drawing shapes opengl es | jjslay | 2 | 3,373 |
Aug 14, 2009 11:07 AM Last Post: jjslay |
|

