Skip to main content
GameDev.net gamedev.net
🔒 Locked

VSync in SDL

Started by Pogo708 Oct 18, 2004 at 9:23 PM 7 replies 5.6k views
Original Post
Pogo708
Pogo708
How would I enforce this? Thanks.
---"What? What is it? Is it the monkey in the pants? It's the monkey in the pants, isn't it. Don't give me that look."
sand_man
sand_man
This topic has been brought up before.
You cant turn it on within SDL
You can only force it with your gfx card drivers.
You shouldn't need vsync when programming anyway. There should be no reason why you need to limit the fps. All animations, movement etc should be time based and should not rely on the speed of the computer.
ben_02
ben_02
The purpose of VSync isn't to limit the FPS. It's a side effect. It's used to syncronise the FPS with the monitors refresh rate, so you can't see the image 'tearing'.
RichardoX
RichardoX
You don't need Vsync when working with SDL. I think that SDL takes care of this for you. SDL_Flip and SDL_UpdateRect should do Vsyncing for you. At least I've never experienced any strange artifacts while using SDL.

-Richardo
sand_man
sand_man
turning vsync on will sync SDL_Flip with every monitor refresh
you cant turn vsyncon in SDL
Sneftel
Sneftel
Quote:

You shouldn't need vsync when programming anyway. There should be no reason why you need to limit the fps. All animations, movement etc should be time based and should not rely on the speed of the computer.
Uh... ever heard of cel-based animation?
Pipo DeClown
Pipo DeClown
Hehe.. Use the OpenGL extension. WGL_EXT_swap_control!

Dunno if that would mean you couldn't use SDL graphics anymore..
c-gibson-s
c-gibson-s
By default SDL 'waits' until monitor refresh before drawing to the screen, essentially using a vsync like thing to prevent tearing.

It handles it for you basically.
gib.son

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.