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 3 of 3

Thread: Fonts???

  1. #1
    Junior Member Newbie
    Join Date
    Apr 2000
    Posts
    11

    Fonts???

    Is there any way that I can blit bitmaps onto the screen, while using the perspective project mode, or does anybody know of any sites that have tutorials of how to load a TrueType font and display it? (while in perspective project mode)

  2. #2
    Member Regular Contributor
    Join Date
    Feb 2000
    Location
    milano, italy
    Posts
    282

    Re: Fonts???

    as a rule of thumb, don't blit anything!
    put textures on a quad instead.
    blitting wit glCopyPixels() is very slow, where texturing is much faster.

    this way your text will behave just like another opengl object, underlying to glTranslate(), glRotate() and the other matrix functions.

    to render text with perspective on, just set the modelview matrix to the identity, then draw textured quads with some ascii on them.

    Dolo/\/\ightY
    Dolo/\/\ightY

  3. #3
    Junior Member Newbie
    Join Date
    Jan 2004
    Posts
    10

    Re: Fonts???

    Hi,

    I'm having the same issues as you it sounds. The first part I can answer for you the second (about the true type fonts) is a loss in my opinion.

    So, in order to draw 2D graphics on top of a 3D view, think of it like layers in photo shop, render the scene with:

    gluPerspective(FOV, aspect, nearClip, farClip);
    Render3DView();
    then switch to:
    gluOrtho2D(left, right, top, bottom);
    Render2DData();


    Render3DView(); and Render2D(); are just theoretical functions supplied by you but I think you understand. Don't forget to glEnable all the blending and stuff like that.

    -=GB=-

Posting Permissions

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