Commit eb508c4b authored by Ryan C. Gordon's avatar Ryan C. Gordon

Fixed OpenGL usage in Quartz target when SDL_SetVideoMode() is called without

 explicitly calling SDL_GL_LoadLibrary() first.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401198
parent 899552b9
...@@ -57,6 +57,12 @@ int QZ_SetupOpenGL (_THIS, int bpp, Uint32 flags) { ...@@ -57,6 +57,12 @@ int QZ_SetupOpenGL (_THIS, int bpp, Uint32 flags) {
int i = 0; int i = 0;
int colorBits = bpp; int colorBits = bpp;
/* if a GL library hasn't been loaded at this point, load the default. */
if (!this->gl_config.driver_loaded) {
if (QZ_GL_LoadLibrary(this, NULL) == -1)
return 0;
}
if ( flags & SDL_FULLSCREEN ) { if ( flags & SDL_FULLSCREEN ) {
attr[i++] = NSOpenGLPFAFullScreen; attr[i++] = NSOpenGLPFAFullScreen;
...@@ -151,9 +157,6 @@ int QZ_SetupOpenGL (_THIS, int bpp, Uint32 flags) { ...@@ -151,9 +157,6 @@ int QZ_SetupOpenGL (_THIS, int bpp, Uint32 flags) {
/* End Wisdom from Apple Engineer section. --ryan. */ /* End Wisdom from Apple Engineer section. --ryan. */
/* Convince SDL that the GL "driver" is loaded */
this->gl_config.driver_loaded = 1;
return 1; return 1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment