As discussed earlier, we’re changing SDL_GL_LoadLibrary() to explicitly
consider NULL to mean “the most reasonable default library for the
current platform” … this means we won’t have to hardcode every app to
have:
#if WINDOWS #define GLLIB “OPENGL32.DLL” #elif LINUX #define GLLIB “libGL.so.1” #elif MACOSX #define GLLIB “/System/Library/Frameworks/OpenGL.framework” #else #error please define your platform #endif
lib = SDL_GL_LoadLibrary(GLLIB);
However, I need to know WHAT the reasonable default is for the following
platforms:
photon
gem/ataricommon
dc (is there any real GL_LoadLibrary facility here?)
cybergfx (is there any real GL_LoadLibrary facility here?)
Le Tue, 22 Nov 2005 03:52:15 -0500
"Ryan C. Gordon" a ?crit:
However, I need to know WHAT the reasonable default is for the
following platforms:
photon
gem/ataricommon
dc (is there any real GL_LoadLibrary facility here?)
cybergfx (is there any real GL_LoadLibrary facility here?)
I handled the NULL case since the beginning in ataricommon, so it should
be OK as it is.
Just a question: do you want to check for NULL in SDL_video.c, in
SDL_GL_LoadLibrary() function before passing it to the video driver? Or
do you want each video driver to pickup the right default value when
NULL is passed (which I already do) ?–
Patrice Mandin
WWW: http://pmandin.atari.org/
Programmeur Linux, Atari
Sp?cialit?: D?veloppement, jeux
I handled the NULL case since the beginning in ataricommon, so it should
be OK as it is.
Oh, ok. Good.
Just a question: do you want to check for NULL in SDL_video.c, in
SDL_GL_LoadLibrary() function before passing it to the video driver? Or
do you want each video driver to pickup the right default value when
NULL is passed (which I already do) ?
The video driver is going to have to handle it eventually, so it’s best
to just check for NULL when it gets to the driver-specific
implementation of SDL_GL_LoadLibrary()…
We’ll probably come to a point someday where some platform moved a
crucial library and we need to check two places or a system version
number, so having this in driver-specific code instead of an #ifdef is
useful for future protection.