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

Thread: Constant Frame Rate

  1. #1
    Intern Newbie
    Join Date
    Nov 2006
    Location
    California
    Posts
    37

    Constant Frame Rate

    hello,

    My frame rate is stuck at 60 fps no matter what I do. How can I tell OpenGL to display the frame buffer without waiting for a vertical refresh signal?

    I used to use this code to wait before displaying a frame.

    while(1) { if (inp(0x3da)&8 == 8) break; }

    Apparently, OpenGL is doing this for me whether I want it or not. How do I turn it off?

    Thanks for any help.

  2. #2
    Senior Member OpenGL Pro k_szczech's Avatar
    Join Date
    Feb 2006
    Location
    Poland
    Posts
    1,119

    Re: Constant Frame Rate

    Use WGL_EXT_swap_control. If you set swap hintto 0 you will disable vsync, with 1 (or higher, but that's rarely used) you will enable it.

  3. #3
    Intern Newbie
    Join Date
    Nov 2006
    Location
    California
    Posts
    37

    Re: Constant Frame Rate

    Yes, that extension is present on my card, and I'm setting it using wglSwapIntervalEXT(0), but my frame-rate stays at 60. Can you think of any reason why this will not work?

    If I disable double-buffering, frame-rate jumps to over 1000 fps.

    Thanks.

  4. #4
    Advanced Member Frequent Contributor yooyo's Avatar
    Join Date
    Apr 2003
    Location
    Belgrade, Serbia
    Posts
    883

    Re: Constant Frame Rate

    Turn off vsync in driver settings pages.

  5. #5
    Intern Newbie
    Join Date
    Nov 2006
    Location
    California
    Posts
    37

    Re: Constant Frame Rate

    Thanks, yooyo, I've tried that also with no luck.

    Maybe my card (Nvidia) has an issue with this feature on a notebook? I'll continue to look into that.

    I am guessing that OpenGL does not care about vsync at all, and it is managed through Windows Wgl.

    At least I can see an approximation of the true frame-rate by disabling double-buffer. This was my ultimate goal anyway, as I do not expect any of my apps to be released without double-buffering and vsync on.

  6. #6
    Advanced Member Frequent Contributor yooyo's Avatar
    Join Date
    Apr 2003
    Location
    Belgrade, Serbia
    Posts
    883

    Re: Constant Frame Rate

    Try another drivers. Visit www.laptopvideo2go.com


    This is very confusing...
    Code :
    while(1) { if (inp(0x3da)&8 == 8) break; }
    I used such code 10 years ago under DOS when I play with graphics programming. I think it's not working under Windows.

  7. #7
    Junior Member Newbie
    Join Date
    Aug 2003
    Posts
    18

    Re: Constant Frame Rate

    I would say your Control Panel driver settings override anything you set in OpenGL, so you must
    disable them there first.

Posting Permissions

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