While waiting for the new ATI drivers, I wrote the attached patch. It
adds a new OpenGL flag for SDL called SDL_GL_SWAP_CONTROL, which
enables setting vsync swap control in OpenGL from SDL. Currently
supports only GLX and AGL, but I could easily add WGL as well if there
is interest in this. However, once the new ATI driver came, it turned
out ATI do not support the swap control GLX extension (they do support
the swap control extension under WGL, however), so I could not test if
my patch actually worked.
Also, (why) isn’t SDL_GL_Get_Attribute() available on Macs?
Let me know if there is any interest in adding such support to SDL. If
so, I’ll need someone else to test this patch.
Relevant links:
http://oss.sgi.com/projects/ogl-sample/registry/SGI/swap_control.txt
http://oss.sgi.com/projects/ogl-sample/registry/EXT/wgl_swap_control.txt
- Per
-------------- next part --------------
A non-text attachment was scrubbed…
Name: swap_control.diff
Type: text/x-patch
Size: 5423 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20050123/e5c4d836/attachment.bin