Opengl Text
What are you guys currently using?
I'm using bitmap fonts, and i'm curious if i should be using something better.
Quote:Original post by Mortilles
But this technique requires more power from GP.
What technique?
Textures are stored in VRAM and vertices are in a VBO (also in VRAM), so there is as little delay as possible when rendering.
wglUseFontBitmaps is a black box. No one knows what it does exactly but it's a 15 year old code written by MS.
Yeah I finally wrote a damn center function that i needed desperately.
Texture mapped fonts seem like the best option, but it would be nice to have variable width characters.
I know promit wrote some code for one a while back.
Only problem I have with bitmap fonts is they are windows only and no AA on the fonts...
Texture mapped fonts seem like the best option, but it would be nice to have variable width characters.
I know promit wrote some code for one a while back.
Only problem I have with bitmap fonts is they are windows only and no AA on the fonts...
use textured polygons and freetype, it's fast, free and you can use ANY TTF font. See nehe's for a tutorial that does the whole thing. Oh variable width is no problem with freetype based fonts :)
I texture my text and translate each character according to a predefined width in an array. I like being able to draw my own fonts. :)
Using D3D (Although the concept should map to OpenGL easily):
I use a Win32 DIB section and draw characters into that, then copy the bit data to a texture. GetGlyphOutline then tells you the size and shape of the letter, which I cache and use to spit out vertices.
I use a Win32 DIB section and draw characters into that, then copy the bit data to a texture. GetGlyphOutline then tells you the size and shape of the letter, which I cache and use to spit out vertices.
I use a bitmap font. Texture is 16x16 evenly spaced characters, texturing quads with them and compiling as a sequence of display lists. I think I based this on Nehe or on some LWJGL tutorial, can't really remember. I mean to replace it with AngelCode fonts eventually but so far that feature has been low-priority.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement