Commit cbc63acd authored by Sam Lantinga's avatar Sam Lantinga

Make sure the OpenGL library is loaded before setting up OpenGL

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401441
parent 218d042d
...@@ -37,6 +37,14 @@ int Mac_GL_Init(_THIS) ...@@ -37,6 +37,14 @@ int Mac_GL_Init(_THIS)
GLint attributes [ 24 ]; /* 24 is max possible in this setup */ GLint attributes [ 24 ]; /* 24 is max possible in this setup */
GLboolean noerr; GLboolean noerr;
/* load the gl driver from a default path */
if ( ! this->gl_config.driver_loaded ) {
/* no driver has been loaded, use default (ourselves) */
if ( Mac_GL_LoadLibrary(this, NULL) < 0 ) {
return(-1);
}
}
attributes[i++] = AGL_RGBA; attributes[i++] = AGL_RGBA;
if ( this->gl_config.red_size != 0 && if ( this->gl_config.red_size != 0 &&
this->gl_config.blue_size != 0 && this->gl_config.blue_size != 0 &&
...@@ -104,7 +112,7 @@ int Mac_GL_Init(_THIS) ...@@ -104,7 +112,7 @@ int Mac_GL_Init(_THIS)
aglDestroyPixelFormat(format); aglDestroyPixelFormat(format);
#if TARGET_API_MAC_CARBON #if TARGET_API_MAC_CARBON
noerr = aglSetDrawable(glContext, GetWindowPort(SDL_Window)); noerr = aglSetDrawable(glContext, GetWindowPort(SDL_Window));
#else #else
noerr = aglSetDrawable(glContext, (AGLDrawable)SDL_Window); noerr = aglSetDrawable(glContext, (AGLDrawable)SDL_Window);
#endif #endif
......
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