Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Don't wait for vsync

Posted on 2003-11-18
9
Medium Priority
?
3,212 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
[X]
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
  • 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 2000 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
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: 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.

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 my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

688 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