SDL_GL_SWAP_CONTROL fix for X11 [patch]


When experimenting with vsync under GNU/Linux, I noticed that
SDL_GL_SWAP_CONTROL was an “OpenGL attribute [] unsupported on this

(I was using Pygame and first thought it was a pygame- or X11-specific
issue, but then I found out that I could use vsync with Pyglet so it
definitely should have worked).

The bug is due to (AFAICT) an implementation oversight in
video/x11/SDL_x11gl.c: it tries to load ‘glXSwapIntervalMESA’ or
’glXSwapIntervalSGI’ dynamically from ‘/usr/lib/’, while it
should load them through ‘glXGetProcAddressARB’.

The following tiny patch does just that, and I now get my smooth
scrolling :slight_smile:

What do you think?–
-------------- next part --------------
A non-text attachment was scrubbed…
Name: sdl.diff
Type: text/x-diff
Size: 740 bytes
Desc: not available