Tearing even with SDL_GL_DOUBLEBUFFER==1

Hi folks,

Copious googling couldn’t get me anywhere with this problem.

I am using SDL with OpenGL on windows.

I set SDL_GL_DOUBLEBUFFER to 1, before calling setVideoMode. And I check
after setVideoMode that this succeeded.

Graphics card is ATI Mobility Radeon 7500. Its control panel driver has an
OpenGL tab with an option “Wait for Vertical Sync”. The options are “Always
Off” and “Application preference”. I have set it to “Application
Preference”.

My code uses SDL_GL_SwapBuffers() – I’m not using SLD_Flip().

And yet, with all of the above in place, I still get tearing.

Surely my environment supports vertical sync / doublebuffering and the
SDL/GL combination should be using it.

What am I doing wrong?

josh

Josh Singer wrote:

Surely my environment supports vertical sync / doublebuffering and the
SDL/GL combination should be using it.

No. Vertical retrace syncing for OpenGL was not enabled in SDL 1.2.9.
Support for it for Mac OS X, X11, and Windows just got into svn a few
days ago (see http://bugzilla.libsdl.org/show_bug.cgi?id=2,
http://bugzilla.libsdl.org/show_bug.cgi?id=117). It should be present
in the latest snapshot from http://www.libsdl.org/svn.php, or you can
wait for 1.2.10 to be released.

You enable it using

SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);

Setting it to n > 0 causes a buffer swap every nth retrace, setting it
to 0 (the default) swaps immediately as before.

-Christian

Thanks for the update. That explains a lot.

Do you happen to know when SDL 1.2.10 is planned?

cheers,

joshOn 5/3/06, Christian Walther wrote:

Josh Singer wrote:

Surely my environment supports vertical sync / doublebuffering and the
SDL/GL combination should be using it.

No. Vertical retrace syncing for OpenGL was not enabled in SDL 1.2.9.
Support for it for Mac OS X, X11, and Windows just got into svn a few
days ago (see http://bugzilla.libsdl.org/show_bug.cgi?id=2,
http://bugzilla.libsdl.org/show_bug.cgi?id=117). It should be present
in the latest snapshot from http://www.libsdl.org/svn.php, or you can
wait for 1.2.10 to be released.

You enable it using

SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);

Setting it to n > 0 causes a buffer swap every nth retrace, setting it
to 0 (the default) swaps immediately as before.

-Christian


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl