SDL_GL_SWAP_CONTROL deprecated

Hi,
SDL API documentation says that the attribute SDL_GL_SWAP_CONTROL is
deprecated in 1.3.0. So what should I use to achieve the same
behavior? That was the only way I found.

Thanks.–
Imgur

Hi,

I looked extensively into this issue less than a week ago. It seems that one
option (which I got to work, but is nasty on windows) is to use a
glXSwapIntervalSGI call in Linux and a wglSwapInterval or something similar
in Windows. The Windows one has to be obtained with function pointers and
some form of getprocaddress call.

I got most of my information (and got an almost verbatim version to work)
for the windows one here:

http://steinsoft.net/index.php?site=Programming/Code%20Snippets/OpenGL/no7

Feel free to ask questions if you can’t get it to work.

ChristianOn Tue, Jun 1, 2010 at 3:36 PM, Andrea <cyrus.and at gmail.com> wrote:

Hi,
SDL API documentation says that the attribute SDL_GL_SWAP_CONTROL is
deprecated in 1.3.0. So what should I use to achieve the same
behavior? That was the only way I found.

Thanks.


flickr.com/cyrus-and


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

I use the following code:

#if SDL_VERSION_ATLEAST(1,3,0)
SDL_GL_SetSwapInterval(1);
#else /* SDL_VERSION_ATLEAST(1,3,0) /
#ifdef SDL_GL_SWAP_CONTROL
SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
#else /
SDL_GL_SWAP_CONTROL /
DEBUG(“VSync unsupported on old SDL versions (before 1.2.10).”);
#endif /
SDL_GL_SWAP_CONTROL /
#endif /
SDL_VERSION_ATLEAST(1,3,0) */

I’m pretty sure it’s the “right way” ™. It also handles the fact that
it doesn’t exist in old versions either.

EdgarOn 2010?06?03? 01:23, Christian Leger wrote:

Hi,

I looked extensively into this issue less than a week ago. It seems that one
option (which I got to work, but is nasty on windows) is to use a
glXSwapIntervalSGI call in Linux and a wglSwapInterval or something similar
in Windows. The Windows one has to be obtained with function pointers and
some form of getprocaddress call.

I got most of my information (and got an almost verbatim version to work)
for the windows one here:

http://steinsoft.net/index.php?site=Programming/Code%20Snippets/OpenGL/no7

Feel free to ask questions if you can’t get it to work.

Christian

On Tue, Jun 1, 2010 at 3:36 PM, Andrea <cyrus.and at gmail.com> wrote:

Hi,
SDL API documentation says that the attribute SDL_GL_SWAP_CONTROL is
deprecated in 1.3.0. So what should I use to achieve the same
behavior? That was the only way I found.

Thanks.


flickr.com/cyrus-and


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkwIHp4ACgkQolm4VNX3QTytrQCfbLgTcPaF6FfAlfLo1QOI/R3a
GHQAn0y6LQuz4aGZ1XgxVUrB4z3bbOBR
=DG+q
-----END PGP SIGNATURE-----

For SDL 1.3 use SDL_RENDERER_PRESENTVSYNC flag when creating renderer.

Andrea wrote:> Hi,

SDL API documentation says that the attribute SDL_GL_SWAP_CONTROL is
deprecated in 1.3.0. So what should I use to achieve the same
behavior? That was the only way I found.

Thanks.


flickr.com/cyrus-and


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Does that mean that extensions like glXSwapIntervalSGI are preferrably
avoided? Or simply that using SDL_RENDERER_PRESENTVSYNC is more portable?

Also, does that mean that switching from vsync enable to vsync disabled
requires (in 100% portable SDL) the creation of a rendering context? Using
the above extension function, I get perfect control over vsync with just a
flip of a boolean.

ChristianOn Sat, Jun 5, 2010 at 8:26 AM, hardcoder wrote:

For SDL 1.3 use SDL_RENDERER_PRESENTVSYNC flag when creating renderer.

Andrea wrote:

Hi,
SDL API documentation says that the attribute SDL_GL_SWAP_CONTROL is
deprecated in 1.3.0. So what should I use to achieve the same
behavior? That was the only way I found.

Thanks.


flickr.com/cyrus-and


SDL mailing list

http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org