Mercurial > sdl-ios-xcode
diff src/video/SDL_video.c @ 1736:3b2a92126f4d
Implemented bug #2, 117:
Date: Mon, 21 Mar 2005 12:06:14 +0100
From: Per Inge Mathisen
Subject: Re: [SDL] Outstanding patches?
The patch adds support for setting SDL_GL_SWAP_CONTROL to Windows and
X11. In Windows you can also query this enum to check that it is
working, or see what the default is - such functionality does not
exist in GLX. For more information on the standards implemented:
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
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 27 Apr 2006 07:59:16 +0000 |
parents | 8d9bb0cf2c2a |
children | eacc5bc01d1c |
line wrap: on
line diff
--- a/src/video/SDL_video.c Wed Apr 26 23:17:39 2006 +0000 +++ b/src/video/SDL_video.c Thu Apr 27 07:59:16 2006 +0000 @@ -233,6 +233,7 @@ video->gl_config.stereo = 0; video->gl_config.multisamplebuffers = 0; video->gl_config.multisamplesamples = 0; + video->gl_config.swap_control = -1; /* not known, don't set */ /* Initialize the video subsystem */ SDL_memset(&vformat, 0, sizeof(vformat)); @@ -1474,6 +1475,9 @@ case SDL_GL_MULTISAMPLESAMPLES: video->gl_config.multisamplesamples = value; break; + case SDL_GL_SWAP_CONTROL: + video->gl_config.swap_control = value; + break; default: SDL_SetError("Unknown OpenGL attribute"); retval = -1;