Jump to content
  • Advertisement
Sign in to follow this  
richy_

OpenGL VSync on SDL+OpenGL

This topic is 4426 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

Advertisement
Try SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);, although note that it might not work in windowed mode. So to see if it works, you'll need to go full screen.

Cheers,
Shadx

Share this post


Link to post
Share on other sites
The refresh rate is a function of the OS (well, windows manager). In windows, right-click on the screen, Properties, Advance, Monitor Tab should bring you to where you can change the refresh rate.

Shadx

Share this post


Link to post
Share on other sites
You really shouldn't change the refresh rate from inside of the program, at least not unless the user specifies it. Older monitors (like mine) can't support many refresh rates, if your program defaults to, say, 75Hz, it'll come up black on my screen and I won't be able to play.

This has even happened with some professional games, too. That sends me on a hunt through config files and registry values to find where they hide the refresh rate.

And why do you even want to change the refresh rate?

Share this post


Link to post
Share on other sites
"This has even happened with some professional games, too. That sends me on a hunt through config files and registry values to find where they hide the refresh rate."

That's a programming bug you found in other games.
I'm sure there are games out there that would try to create a 1000000 x 1000000 @ 2billion hertz fullscreen if you tell it to.

You can query for the supported monitor modes and choose whichever you want. Wow!

Sorry, I don't know the SDL API but I'm sure the ability is in there.

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!