Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Don't wait for vsync

Posted on 2003-11-18
9
3,206 Views
Last Modified: 2013-12-06
How do you turn off the "wait for vsync" in OpenGL? I feel so silly asking such a simple question, but I can't find the answer anywhere (and believe me, I've looked). I'm using SDL as well, so if there's an SDL wrapper, I'm down with that!

Thanks!
0
Comment
Question by:arudson
  • 3
  • 2
9 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 9778585
There is no Vsync in OpenGL as a command. Most apps use the GLFlush command, sometimes followed by a GLFinish command.
http://www.d-silence.com/video/vsync2.shtml
0
 

Author Comment

by:arudson
ID: 9780120
Actually, I managed to find some information on page flipping controls. It turns out there's a (win32?) extension that will control the frequency of the page flips: WGL_EXT_swap_control

The associated functions are:

bool wglSwapIntervalEXT(int)  // sets the update frequency (0 means no VSYNC)
int wglGetSwapIntervalEXT(void) // gets the update frequency

The frequency is in terms of vertical retraces. So if you say wglSwapIntervalEXT(2), OpenGL will wait for 2 retraces before flipping to the backbuffer.
0
 
LVL 45

Accepted Solution

by:
sunnycoder earned 500 total points
ID: 9784762
arduson,

WGL_EXT_swap_control is an OpenGL extension supported by some accelerators and driver versions. While GeForce and TNT support it, 3D labs and ATI Radeon don't. Using it will lead to largely unportable code even for windows which IMHO will not be acceptable for most(any?) real world opengl application ... The correct solution is the one listed in my first post.

If you still wish to have the question deleted, go ahead.

Sunny
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
LVL 1

Expert Comment

by:Computer101
ID: 9802905
PAQed, with points refunded (500)

Computer101
E-E Admin
0
 

Author Comment

by:arudson
ID: 9810609
Sorry Sunny. I would have given you the points, but I guess the post was closed during the weekend. I only check this board at work, during the week.

Thanks for the info, anyway.
0
 

Author Comment

by:arudson
ID: 9817874
Yes please! Can you accept Sunnycoder's last comment?

Thank you kindly.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

As game developers, we quickly learn that Artificial Intelligence (AI) doesn’t need to be so tough.  To reference Space Ghost: “Moltar, I have a giant brain that is able to reduce any complex machine into a simple yes or no answer. (http://www.youtu…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question