Results 1 to 4 of 4

Thread: URGENT !!! Text in OpenGL window (Nehe)

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2001
    Posts
    9

    URGENT !!! Text in OpenGL window (Nehe)

    Howdy hooo!!!

    I use the glPrint function which is on the Nehe site:
    http://nehe.gamedev.net/tutorials/lesson14.asp

    Why doesn´t the text size change ???

    Another question:
    I should print some text in a OpenGL window and when I used windows API the text flickered like hell.

    Please help me print some text in an OpenGL window !!!!

    /nix

  2. #2
    Senior Member Regular Contributor
    Join Date
    Nov 2000
    Location
    State College, PA
    Posts
    186

    Re: URGENT !!! Text in OpenGL window (Nehe)

    The flickering was probably because you use double-buffering...

    As for the font size - are you sure that you are re-creating the display lists? You're using bitmapped fonts, I think... I don't remember which tut is which. You need to re-create the DLs for a different font size.

    Chris

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2001
    Posts
    9

    Re: URGENT !!! Text in OpenGL window (Nehe)

    I just use one size in my program. I just Build the font once....

    /nix

  4. #4
    Member Newbie
    Join Date
    Oct 2000
    Location
    Toronto, Ontario, Canada
    Posts
    33

    Re: URGENT !!! Text in OpenGL window (Nehe)

    Calls to wglUseFontOutlines() and wglUseFontBitmaps() always map the currently selected font in Windows to a glyph whose cell is 1.0 x 1.0. This is regardless of the size of the current font.

    What this means is that to change the size of the font you should use glScalef() after drawing the text.

Similar Threads

  1. About text and texture -- URGENT !!!
    By sonnik in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 04-18-2009, 07:31 AM
  2. Replies: 1
    Last Post: 01-31-2005, 11:01 AM
  3. Replies: 5
    Last Post: 03-08-2003, 02:01 AM
  4. Did anyone get text to work in your MFC DOC class using NeHe's?
    By KenR7A in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 12-09-2002, 07:10 PM
  5. Nehe Window Base Code Error
    By Running_Wolf in forum OpenGL: Advanced Coding
    Replies: 12
    Last Post: 02-06-2001, 03:30 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean