Mercurial > sdl-ios-xcode
diff src/video/x11/SDL_x11opengl.c @ 2178:114a541cfae2
Creating a context makes it current, per the documentation.
Applied a variant of the multi-card OpenGL fix from SDL 1.2
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Thu, 12 Jul 2007 06:31:36 +0000 |
parents | 12bcd4fd2606 |
children | 5523312f311e |
line wrap: on
line diff
--- a/src/video/x11/SDL_x11opengl.c Thu Jul 12 05:32:07 2007 +0000 +++ b/src/video/x11/SDL_x11opengl.c Thu Jul 12 06:31:36 2007 +0000 @@ -426,8 +426,15 @@ if (!context) { SDL_SetError("Could not create GL context"); + return NULL; } - return (SDL_GLContext) context; + + if (X11_GL_MakeCurrent(_this, window, context) < 0) { + X11_GL_DeleteContext(_this, context); + return NULL; + } + + return context; } int