Results 1 to 3 of 3

Thread: Portable sync to vblank?

  1. #1
    Senior Member Regular Contributor
    Join Date
    Jun 2006
    Location
    Edinburgh - Scotland
    Posts
    146

    Portable sync to vblank?

    Hi,

    Is there a portable way to sync to vblank? I'm running under cygwin with GLUT and an NVIDIA card a CRT and it automatically is sync'ing, but on someone elses laptap the dame program didn't.

    If there's not a portable way, is there any info on the subject in general? I found mention of the NVIDIA environment variable __GL_SYNC_TO_VBLANK, but I can't seem to get that to make any difference.

    Cheers,

    Stuart.

  2. #2
    Junior Member Newbie
    Join Date
    Feb 2005
    Posts
    23

    Re: Portable sync to vblank?

    I'm not sure if you mean vsync. But if you do, then you can use SwapInterval to control whether your app is vsync'd or not. This works on linux and windows.

    #if defined(WIN32)
    wglSwapIntervalEXT(interval);
    #else
    glXSwapIntervalSGI(interval);
    #endif

    interval is 1 for vsync on, 0 for off

    Also, this only works if your driver settings are for application-controlled vsync, not forced off/on.

    HTH
    -VC

  3. #3
    Senior Member Regular Contributor
    Join Date
    Jun 2006
    Location
    Edinburgh - Scotland
    Posts
    146

    Re: Portable sync to vblank?

    That's exactly what I was looking for!

    Thanks,

    Stuart.

Similar Threads

  1. Is there any way to detect VBlank(vertical blank)?
    By lingmaker in forum OpenGL: Windows
    Replies: 0
    Last Post: 11-05-2010, 11:34 AM
  2. Portable way to create a histogram.
    By Foxbat in forum OpenGL: GLSL
    Replies: 3
    Last Post: 11-17-2006, 06:52 PM
  3. utilizing 10 bit DACs, flipping at vblank?
    By jimc in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 12-18-2003, 10:27 AM
  4. Portable render-to-texture?
    By MikeC in forum OpenGL: Advanced Coding
    Replies: 2
    Last Post: 03-25-2001, 08:50 AM
  5. VBLANK and timing
    By shosking in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 02-12-2001, 08:48 AM

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