Jump to content
  • Advertisement
Sign in to follow this  
Bozebo

OpenGL [solved] Let me have higher than 60fps - vsync off

This topic is 3008 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have done a little searching here and through google, but I was unable to find a satisfactory explanation. (also flooded with results that are not about development/programming) How do I have an OpenGL Windows application run at higher than 60 fps? And don't say "60 fps is your monitor refresh rate you can't go higher than that", that is what almost everybody who asked the same thing seems to have been told. I am aware of the monitor limitation, I want to stress test my application and see the frame rate differences to test the performance of my occlusion etc. Every scenario I am able to present the renderer at the moment achieves 60fps - so I cannot test the differrences between situations and optimisation techniques. There seem to be some libraries to work with frame rates, but I don't want to just skip learning the process myself and jump into using a library. Also, I am ok with the whole application (movement speed, etc) going very fast, I need to test different things and I will work out a proper timing system at a later date. Ultimately, I want to disable vsync - I presume I need to use an extension but I cannot find out which. [Edited by - Bozebo on April 26, 2010 8:00:31 AM]

Share this post


Link to post
Share on other sites
Advertisement
OK, I dug out a solution:


void vSync(int interval=1){
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALFARPROC)wglGetProcAddress("wglSwapIntervalEXT");
if( wglSwapIntervalEXT )
wglSwapIntervalEXT(interval);
}

//vsync on
vSync(1);
//vsync off
vSync(0);


Share this post


Link to post
Share on other sites
Which OS are you using?

http://www.devmaster.net/forums/showthread.php?t=443
http://www.google.com.au/search?q=opengl+vsync+off

Share this post


Link to post
Share on other sites
Quote:
Original post by Hodgman
Which OS are you using?

http://www.devmaster.net/forums/showthread.php?t=443
http://www.google.com.au/search?q=opengl+vsync+off


Windows, I said.

Share this post


Link to post
Share on other sites
Using fps to measure performance is not ideal, especially if you are trying to optimize rendering. Carefully timing the parts of the code you are trying to optimize is much better. Read more about it here (if you're interested ;-)

Share this post


Link to post
Share on other sites
Quote:
Original post by Marco81
Using fps to measure performance is not ideal, especially if you are trying to optimize rendering. Carefully timing the parts of the code you are trying to optimize is much better. Read more about it here (if you're interested ;-)


That sounds like a good idea, thanks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!