View Full Version : A fast and sweet way to draw text in openGL applications
07-17-2001, 04:35 AM
I searched around and all I found about drawing text to the screen was using bitmap fonts or outline fonts that's quite when you want something looking good. And I believe text shouldn't be something complicated to draw. It's very useful to find bugs with coordinates or angles when making a game.
Anyway...That's it ! I want text ! http://www.opengl.org/discussion_boards/ubb/tongue.gif
07-18-2001, 07:30 PM
text is OS dependent and also format dependent so this can't be put inside GL. Use the bitmapped text for good quality. What's wrong with bitmapped text or outlined text?
07-19-2001, 01:32 AM
Well....nothing is really WRONG with the bitmap font or the outline font but you're limited with the number of font style you use you have to have a bitmap for every fontstyle you want to have in your application right ?
Anyway I tought this could have been a good idea ! maybe not ! hehe ! http://www.opengl.org/discussion_boards/ubb/smile.gif
07-19-2001, 05:28 PM
GLUT has the ability to do this and I think (not sure, but check the source code and see)that the fonts are not integrated into it.
Bitmapped and outlined fonts can be moved to GLU and perhaps a number of them can be integrated, but is not something to be put inside OpenGL.
We will always need wglFontBitmaps and whatever else there is.
GLUT fonts are built in, and you cannot load your own font either.
I draw text in GL all the time. At the moment I use wglUseFontOutlines which loads the poly outlines of fonts in a display list. This is great http://www.opengl.org/discussion_boards/ubb/cool.gif. DirectX has no solution for this. GL does this very well, but it could be improved. For instance an option to draw the glyphs in a solid line format would be nice. At the moment there is only two options polygon or line. The line option draws the polygon in wireframe. The ability to draw the glyph with a single solid line (which you could vary in thickness) would be nice. There are some internationalization issues as well (double byte fonts) but I would settle for a fast solid line option in wglUseFontOutlines.
07-26-2001, 03:27 AM
Cool I'll try wglUseFontOutlines !
And you're right if i only draws the polygons or lines...it should also draw solid lines and letting the programmer to choose the thickness of that line !
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.