Creating a context makes it current, per the documentation.

Applied a variant of the multi-card OpenGL fix from SDL 1.2

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402497
This commit is contained in:
Sam Lantinga 2007-07-12 06:31:36 +00:00
parent 463ba0e0a6
commit a3245a4e7c
4 changed files with 70 additions and 41 deletions

View file

@ -426,8 +426,15 @@ X11_GL_CreateContext(_THIS, SDL_Window * window)
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