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: glutInitDisplayString speed

  1. #1
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    San Diego, CA, USA
    Posts
    769

    glutInitDisplayString speed

    When using glut, I've had to switch from using glutInitDisplayMode() to using glutInitDisplayString() to be sure that I get a 24 bit depth buffer.

    The problem is, glutInitDisplayString() can make the call to glutCreateWindow() take up to 15 seconds whereas it is almost immediate with glutInitDisplayMode().

    Now, I assumed that it was potentially searching through available rendering contexts when I give it something like "depth>=24", but even when I specify everything with an "=", it is no faster.

    Any ideas about speeding this up would be welcome

    -- Zeno

  2. #2
    Super Moderator OpenGL Guru
    Join Date
    Feb 2000
    Location
    Montreal, Canada
    Posts
    4,421

    Re: glutInitDisplayString speed

    Im not familiar with glut that much, but the speed of creating a new OGL window is driver dependent.

    For a while there, it took forever for a window to appear on my geforce2 mx but my g200 was snappy. Now the nvidia drivers have improved of course.
    Be sure to compare to a non-glut ogl app.

    my 2 cents

    V-man
    ------------------------------
    Sig: http://glhlib.sourceforge.net
    an open source GLU replacement library. Much more modern than GLU.
    float matrix[16], inverse_matrix[16];
    glhLoadIdentityf2(matrix);
    glhTranslatef2(matrix, 0.0, 0.0, 5.0);
    glhRotateAboutXf2(matrix, angleInRadians);
    glhScalef2(matrix, 1.0, 1.0, -1.0);
    glhQuickInvertMatrixf2(matrix, inverse_matrix);
    glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
    glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    San Diego, CA, USA
    Posts
    769

    Re: glutInitDisplayString speed

    Yea, but I mentioned in my post that the window pops up almost instantly if I use glutInitDisplayMode(). Same thing if I avoid GLUT altogether (which I don't always want to do).

    -- Zeno

  4. #4
    Senior Member OpenGL Pro
    Join Date
    Sep 2000
    Location
    Santa Clara, CA
    Posts
    1,463

    Re: glutInitDisplayString speed

    Internally, these sorts of routines make lots of DescribePixelFormat calls, I believe. That can get pretty slow.

    - Matt

  5. #5
    Advanced Member Frequent Contributor
    Join Date
    Feb 2000
    Location
    San Diego, CA, USA
    Posts
    769

    Re: glutInitDisplayString speed

    Thanks guys.

    I guess for now I'll just develop with 16 bit depth buffer (to have a fast turnaround time) and then use debug mode to trace down the slowness in the GLUT source when the program is done.

    -- Zeno

Posting Permissions

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