Jump to content
  • Advertisement
Sign in to follow this  
haphazardlynamed

OpenGL vsych in SDL with tearing

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

Im using SDL with opengl in my game and Im pretty sure that vsync is on, since my fps is always at 60 which is good, I want vsync and i use doublebuffering and the swapbuffers funtion but theres a problem, theres a tear in the middle of my window a horizontal line where the top part is a new frame, and the bottom is the last one So, its like vsync is on, except the phase is wrong or somthing does anyone know what might cause that? or how to fix it? some other sdl using programs other than my own also exhibit this same problem for me it doesnt appear when i hand my game to a friend and have him test on his computer tho....

Share this post


Link to post
Share on other sites
Advertisement
other than the always popular "are you using the latest nVidia drivers? SDL release?" advice, I don't know what to recommend. There are a bunch of tweak-OpenGL settings in the nVidia control panel...you may want to try setting them all to highest quality (or lowest if you are there already) and see if that helps any.

Share this post


Link to post
Share on other sites
i dunno if its my hardware for sure or not....

maybe im totally wrong with how you set stuff up in SDL and im missing something about vsync?
i havent exactly read a manual.....
are there special initialization things that might do this behaviour of one were to forget to set them?



or perhaps there are special opengl or windows calls that i have no idea about but need to do to make this work?

Share this post


Link to post
Share on other sites
Quote:
are there special initialization things that might do this behaviour of one were to forget to set them?
or perhaps there are special opengl or windows calls that i have no idea about but need to do to make this work?


nope, pretty much everything having to do with vertical sync is done with the OpenGL drivers. There is an OpenGL extension you can use to force it one way or the other, but since you're not using that it should be using the driver's default.

You did use:
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 );

and not the SDL_DOUBLEBUF flag, right?

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!