Drawing Text With OpenGL ES?

Sage
Posts: 1,066
Joined: 2004.07
Post: #1
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?
Quote this message in a reply
Member
Posts: 94
Joined: 2008.08
Post: #2
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?
Quote this message in a reply
Member
Posts: 353
Joined: 2002.04
Post: #3
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.
Quote this message in a reply
Sage
Posts: 1,066
Joined: 2004.07
Post: #4
Well crud. If anyone happens to have the Texture2D class laying around and feels so compelled, my email address is nick@gravelyn.com. Grin
Quote this message in a reply
Moderator
Posts: 3,577
Joined: 2003.06
Post: #5
I just sent a project to you. Wink
Quote this message in a reply
Nibbie
Posts: 2
Joined: 2009.01
Post: #6
I need it to: mxclouti@gmail.com
Thanks.
Quote this message in a reply
Nibbie
Posts: 2
Joined: 2009.01
Post: #7
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/
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  OpenGL Cube drawing: VBOs, instanced geometry, octrees Symbol$ 5 9,141 Dec 23, 2011 01:43 PM
Last Post: Skorche
  Drawing menu versus drawing game johncmurphy 4 4,305 Jan 6, 2010 09:14 AM
Last Post: AnotherJake
  OpenGL ES : Drawing Text... savage 8 10,081 Jan 4, 2010 08:59 PM
Last Post: alerus
  openGL n00b looking for FBO drawing examples or direction auptown 5 7,244 Nov 4, 2009 02:16 AM
Last Post: Eskema
  Drawing shapes opengl es jjslay 2 4,103 Aug 14, 2009 11:07 AM
Last Post: jjslay