Add support for (GLX|WGL)_EXT_swap_control_tear.

This required a small public API change: SDL_GL_SetSwapInterval() now accepts
 negative values, and SDL_GL_GetSwapInterval() doesn't report errors anymore
 (if it can't work, it'll return zero as a reasonable default).

If you need to test for errors, such as a lack of swap_control_tear support,
 check the results of SDL_GL_SetSwapInterval() when you set your desired
 value.
This commit is contained in:
Ryan C. Gordon 2012-08-01 20:29:36 -04:00
parent 706ea79345
commit 2cd5fc4e97
10 changed files with 67 additions and 52 deletions

View file

@ -27,7 +27,8 @@
struct SDL_GLDriverData
{
int WGL_ARB_pixel_format;
SDL_bool HAS_WGL_ARB_pixel_format;
SDL_bool HAS_WGL_EXT_swap_control_tear;
void *(WINAPI * wglGetProcAddress) (const char *proc);
HGLRC(WINAPI * wglCreateContext) (HDC hdc);