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

Thread: Synchronizing to vertical retrace

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2007
    Posts
    23

    Synchronizing to vertical retrace

    Hi,

    I want to control frame per second to 60 using glut main loop. But currently it is running around 1400 FPM, how can I make that to run at 60 hz. On SGI there was a call like glXWaitVideosync(), to do it, what is the equivalent of that in OpenGL on Windows.

    thanks
    NT
    nt

  2. #2
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Synchronizing to vertical retrace

    wglSwapInterval(1);

  3. #3
    Junior Member Newbie
    Join Date
    Mar 2007
    Posts
    23

    Re: Synchronizing to vertical retrace

    that is using wgl, is there any equivalent in glut/opengl for windows
    nt

  4. #4
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,655

    Re: Synchronizing to vertical retrace

    How cute ...
    You are posting on the "advanced" forum, so what do you think "glut for windows" uses ?

    You got it, wgl* functions ! Check the source if you don't believe me.

    So just slam the wglSwapInterval once you got glut window created.

Posting Permissions

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