Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11gl.c @ 1182:e8e8dcb68e7a
X11 driver now chooses "libGL.so.1" as a default when a NULL is passed to
SDL_GL_LoadLibrary().
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Tue, 22 Nov 2005 09:05:15 +0000 |
parents | 045f186426e1 |
children | 2bd4cec0de63 |
comparison
equal
deleted
inserted
replaced
1181:49d3efec6651 | 1182:e8e8dcb68e7a |
---|---|
416 #endif | 416 #endif |
417 } | 417 } |
418 | 418 |
419 #ifdef HAVE_OPENGL | 419 #ifdef HAVE_OPENGL |
420 | 420 |
421 /* If this is wrong, please put some #ifdefs for your platform! */ | |
422 #define DEFAULT_GL_DRIVER_PATH "libGL.so.1" | |
423 | |
421 /* Passing a NULL path means load pointers from the application */ | 424 /* Passing a NULL path means load pointers from the application */ |
422 int X11_GL_LoadLibrary(_THIS, const char* path) | 425 int X11_GL_LoadLibrary(_THIS, const char* path) |
423 { | 426 { |
424 void* handle; | 427 void* handle; |
425 int dlopen_flags; | 428 int dlopen_flags; |
426 | 429 |
427 if ( gl_active ) { | 430 if ( gl_active ) { |
428 SDL_SetError("OpenGL context already created"); | 431 SDL_SetError("OpenGL context already created"); |
429 return -1; | 432 return -1; |
430 } | 433 } |
434 | |
435 if ( path == NULL ) { | |
436 path = DEFAULT_GL_DRIVER_PATH; | |
437 } | |
431 | 438 |
432 #ifdef RTLD_GLOBAL | 439 #ifdef RTLD_GLOBAL |
433 dlopen_flags = RTLD_LAZY | RTLD_GLOBAL; | 440 dlopen_flags = RTLD_LAZY | RTLD_GLOBAL; |
434 #else | 441 #else |
435 dlopen_flags = RTLD_LAZY; | 442 dlopen_flags = RTLD_LAZY; |