Date: Wed, 23 May 2007 00:39:47 +0300
authorRyan C. Gordon
Tue, 22 May 2007 22:13:56 +0000
changeset 210512bcd4fd2606
parent 2104 a76e8b9f3d2e
child 2106 2714a8976e37
Date: Wed, 23 May 2007 00:39:47 +0300
From: "Eyal Lotem"
To: "SDL Mailing List" <sdl@lists.libsdl.org>
Subject: [SDL] Bug in GL_SWAP_CONTROL extension name.

The checked extension name is incorrect.
The attached patch fixes it to the correct name.

I don't think that under any setup, this extension name was ever
correct, which is why its not OR'd against the old check.

This fixes the "tear effect" (vsync problems) I had here with nVidia
GLX drivers.

Eyal
src/video/x11/SDL_x11opengl.c
     1.1 --- a/src/video/x11/SDL_x11opengl.c	Wed Apr 04 10:41:00 2007 +0000
     1.2 +++ b/src/video/x11/SDL_x11opengl.c	Tue May 22 22:13:56 2007 +0000
     1.3 @@ -224,7 +224,7 @@
     1.4      }
     1.5  
     1.6      /* Check for SGI_swap_control */
     1.7 -    if (HasExtension("SGI_swap_control", extensions)) {
     1.8 +    if (HasExtension("GLX_SGI_swap_control", extensions)) {
     1.9          _this->gl_data->glXSwapIntervalSGI =
    1.10              (int (*)(int)) X11_GL_GetProcAddress(_this, "glXSwapIntervalSGI");
    1.11      }