Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 5 of 5

Thread: 2D font in 3D space

Hybrid View

  1. #1
    Junior Member Newbie
    Join Date
    Jan 2001
    Location
    Orlando, FL, USA
    Posts
    1

    2D font in 3D space

    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.

  2. #2
    Senior Member OpenGL Guru zed's Avatar
    Join Date
    Jul 2000
    Location
    S41.16.25 E173.16.21
    Posts
    2,609

    Re: 2D font in 3D space

    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

  3. #3
    Member Regular Contributor
    Join Date
    Nov 2000
    Location
    Dunblane, Scotland
    Posts
    353

    Re: 2D font in 3D space

    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
    Reality is for idiots only the best over come it!

  4. #4
    Intern Contributor
    Join Date
    Mar 2000
    Location
    Leiden, The Netherlands
    Posts
    59

    Re: 2D font in 3D space

    The GLTT 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.

  5. #5
    Member Regular Contributor
    Join Date
    Jul 2000
    Location
    Arlon, Belgium
    Posts
    486

    Re: 2D font in 3D space

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •