Original Post
Well, I'm at the point were I should get my UI system working and I wanted to start with something challenging: Text. Before I can get to the nitty-gritty of where the letters go (which is the really "fun" part) I need to decide how I'm going to get them on to the screen. I'm using OpenGL, so I'm going to be using textured quads to put the text up there.
Right now I can see 2 ways to go about drawing the glyphs:
Render the font to a texture and draw each glyph separately
Pros:
-Easy
-Can pre-render a font to one or more textures
Cons:
-Lots o' quads
-Deciding which glyphs to include
-If you exclude a glyph, you can't draw it
-Keeping track of which glyphs are on which textures
Allocate regions of a texture to render text to
Pros:
-Draw all of the text on a few quads
-Don't have to worry about which glyphs to include
-Can render at any DPI/size as needed
Cons:
-Have to update the texture if the text changes
-Have to keep a library to render the glyphs
-Keeping track of which regions are on which textures
I'm just having difficulty deciding which method to use. I'd like for this to be cross platform, including the iPhone/iPT/iPad. I know in most cases a few of the cons aren't really worth considering (quad count). If anybody else can think of other pros/cons that would help me decide, or other suggestions, that would be appreciated.
Right now I can see 2 ways to go about drawing the glyphs:
Render the font to a texture and draw each glyph separately
Pros:
-Easy
-Can pre-render a font to one or more textures
Cons:
-Lots o' quads
-Deciding which glyphs to include
-If you exclude a glyph, you can't draw it
-Keeping track of which glyphs are on which textures
Allocate regions of a texture to render text to
Pros:
-Draw all of the text on a few quads
-Don't have to worry about which glyphs to include
-Can render at any DPI/size as needed
Cons:
-Have to update the texture if the text changes
-Have to keep a library to render the glyphs
-Keeping track of which regions are on which textures
I'm just having difficulty deciding which method to use. I'd like for this to be cross platform, including the iPhone/iPT/iPad. I know in most cases a few of the cons aren't really worth considering (quad count). If anybody else can think of other pros/cons that would help me decide, or other suggestions, that would be appreciated.