Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: wglUseFontOutlines - horribly slow

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2002
    Posts
    16

    wglUseFontOutlines - horribly slow

    i'm trying to use wglFontOutlines, but it seems to render at about 2 - 3 frames per second. I practically copied code from a tutorial from gametutorials.com, which runs much faster than mine. what am I doing wrong? thanks.

  2. #2
    Senior Member OpenGL Pro
    Join Date
    May 2001
    Location
    Kristianstad,Skåne,Sweden
    Posts
    1,595

    Re: wglUseFontOutlines - horribly slow

    Hi !

    Not sure what it could be, but one thing that might cause problems is if you set the tesselation to hight, this can generate a huge amount of triangles/lines (it's the 5th argument, the deviation, the closer to zero you set this value the more geometry will be generated.

    That's the only thing I can think of at the moment.

    Mikael

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2002
    Posts
    16

    Re: wglUseFontOutlines - horribly slow

    Thanks for reply.

    No not too much geometry. Frame rate the same for half quality and each for just one character.

    Any other ideas anyone?

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Location
    Shreveport, LA, USA
    Posts
    1,505

    Re: wglUseFontOutlines - horribly slow

    Are you using a software OpenGL implementation? Check the GL_RENDERER string?

  5. #5
    Junior Member Newbie
    Join Date
    Mar 2002
    Posts
    16

    Re: wglUseFontOutlines - horribly slow

    nope. using hardware renderer. flying text screensaver works fine. wglUseFontOutlines tutorials downloaded from net work fine. all other opengl programs work fine. used wglUsefontOutlines with one character and no extrusion and still only 2 - 3 fps. i just don't get it. tried on three different boxes. ???

  6. #6
    Senior Member OpenGL Pro
    Join Date
    Jun 2000
    Location
    Shreveport, LA, USA
    Posts
    1,505

    Re: wglUseFontOutlines - horribly slow

    The fact that that screensaver is using hardware acceleration does not mean your program is as well. Check the GL_RENDERER string. The fact that it is slow on multiple systems tends to suggest to me your context is using the Microsoft software renderer. Or that you are in general doing something that is causing your OpenGL implementation take a software path.

  7. #7
    Junior Member Newbie
    Join Date
    Mar 2002
    Posts
    16

    Re: wglUseFontOutlines - horribly slow

    Thanks for all the help guys but I figured it out. I used a funtion to create the display lists and return an integer to the base list.

    #define BASE CreateOutlineFonts( ... )

    i used the #define to hold the value of the integer because it was going to remain constant through out the program. Then i changed it to a global variable and it works fine.

    question now is, why would i need the base in a variable instead of being able to use the #define?

  8. #8
    Junior Member Regular Contributor
    Join Date
    Sep 2001
    Location
    Eastern USA
    Posts
    218

    Re: wglUseFontOutlines - horribly slow

    It looks to me like you were using BASE when drawing your letters, meaning you were also generating them on the fly while drawing... repeatedly.

    If so, I'm curious how long it would run before crashing...

  9. #9
    Junior Member Newbie
    Join Date
    Mar 2002
    Posts
    16

    Re: wglUseFontOutlines - horribly slow

    I used the #define construct outside of my rendering loop, so I shouldn't have been recreating the lists as i was going, but it did seem to act like that. after about 5 -10 seconds it got even slower. i never let it get to the point of crashing but i always had to "end task" it or i couldn't get it to close.

  10. #10
    Junior Member Regular Contributor
    Join Date
    Dec 2001
    Location
    London, England
    Posts
    160

    Re: wglUseFontOutlines - horribly slow

    Using the #define WILL call CreateOutlineFonts each frame.
    Remember that the preprocessor simply does a text substitution for #define.
    If you had:

    for(;; )
    {
    ...
    glListBase(BASE);
    }

    it will be converted to:

    for(;; )
    {
    ...
    glListBase(CreateOutlineFonts(...));
    }

    EDIT: Stupid Smileys

    [This message has been edited by bakery2k (edited 05-12-2002).]

Posting Permissions

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