Solved

Don't wait for vsync

Posted on 2003-11-18
9
3,202 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

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…
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

759 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

18 Experts available now in Live!

Get 1:1 Help Now