PDA

View Full Version : 2D font in 3D space



my357magnum
01-02-2001, 10:48 AM
I would like to know if anyone has a way of drawing scalable, bitmap fonts in a 3D scenegraph. I am currently using wglUseFontBitmaps, but for some reason I cannot modify the Z value in any rotations or translations. My goal is to create a string of variable length and content that can be placed any where in a 3D environment, while facing the camera much like a billboard. I can get it to work with fontOutlines and partially with rasterPos, but fontOutlines absorbs polygons much too quickyly, and the rasterPos never seems to scale with distance. If anyone has any ideas or suggestions please let me know. Thanks.

zed
01-02-2001, 12:29 PM
use a polygon with a font texture on it.
u can draw it in your scene either billboarded or using 2d different matrices. one 3d and one 2d

Tim Stirling
01-03-2001, 10:57 AM
look at nehe.gamedev.net in the tutorials select for various font implementations. To locate the font in 3d you need to use the glTranslate function

DPalomo
01-04-2001, 12:05 AM
The GLTT (http://gltt.sourceforge.net) library gives you a lot of true type font functionality. Not only bitmapped fonts, but also anti-aliased fonts as 3D polygonized fonts, from true type fonts.

Hope this helps,

Daniel Palomo van Es.

Leyder Dylan
01-04-2001, 12:50 PM
Hi,

IU've a example who display a rotating cube with a FPS counter.

If you want the source code, send me a mail at : dylan.leyder@ibelgique.com

The comments are in french.