Solved

Don't wait for vsync

Posted on 2003-11-18
9
3,203 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

929 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now