1

I'm working on an application which uses SDL (1.2.15) with OpenGL. It works fine in most cases. The problem occurs, when it's running on a laptop with pretty old nVidia drivers (February 2008). There is screen tearing effect. It looks like double buffering is not working properly (there's a horizontal bar moving up and down and sometimes, when one sprite is rendered on another sprite I can see both flickering) The same happens with simple SDL + OpenGL example I found here: http://users.soe.ucsc.edu/~pang/161/w06/prog3/SDL-docs/html/guidevideoopengl.html I tried adding SDL_GL_SetAttribute( SDL_GL_SWAP_CONTROL, 1 ), but it didn't help. Updating nVidia drivers would probably solve the problem, but I would like to run my app on older machines. Does anyone know how to get rid of screen tearing? I'm out of ideas.

jr_
  • 31
  • 4
  • Use SDL2, it works on all platforms and it's double-buffered as long as you call rendering functions in the right order. – olevegard Feb 05 '14 at 12:30
  • I hoped I would fix it somehow without migrating project to SDL2. – jr_ Feb 05 '14 at 13:18
  • @olevegard: Double buffering by itself does nothing to solve this problem. You need some mechanism to prevent the buffer swap from occurring while the display device is redrawing the screen. The swap interval is used for this purpose, but drivers can override this in such a way that the application can request it until the cows come home and still not have VSYNC. – Andon M. Coleman Feb 06 '14 at 01:57

0 Answers0