diff --git a/neo/renderer/RenderSystem_init.cpp b/neo/renderer/RenderSystem_init.cpp index a8b900c6..eeaddcff 100644 --- a/neo/renderer/RenderSystem_init.cpp +++ b/neo/renderer/RenderSystem_init.cpp @@ -279,7 +279,7 @@ PFNGLDEPTHBOUNDSEXTPROC qglDepthBoundsEXT; // DG: couldn't find any extension for this, it's supported in GL2.0 and newer, incl OpenGL ES2.0 // SE: only the ATI implementation is provided on Mac OS X 10.4 and 10.5 -#if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 1050) +#if OSX_TIGER || OSX_LEOPARD PFNGLSTENCILOPSEPARATEATIPROC qglStencilOpSeparate; #else PFNGLSTENCILOPSEPARATEPROC qglStencilOpSeparate; @@ -403,12 +403,12 @@ static void R_CheckPortableExtensions( void ) { if ( glConfig.twoSidedStencilAvailable ) qglActiveStencilFaceEXT = (PFNGLACTIVESTENCILFACEEXTPROC)GLimp_ExtensionPointer( "glActiveStencilFaceEXT" ); -#if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 1050) +#if OSX_TIGER || OSX_LEOPARD if( glConfig.glVersion >= 2.0) { - common->Printf( "... got GL2.0+ glStencilOpSeparate()\n" ); + common->Printf( "... got GL2.0+ glStencilOpSeparateATI()\n" ); qglStencilOpSeparate = (PFNGLSTENCILOPSEPARATEATIPROC)GLimp_ExtensionPointer( "glStencilOpSeparateATI" ); } else { - common->Printf( "... don't have GL2.0+ glStencilOpSeparate()\n" ); + common->Printf( "... don't have GL2.0+ glStencilOpSeparateATI()\n" ); qglStencilOpSeparate = NULL; } #else diff --git a/neo/renderer/qgl.h b/neo/renderer/qgl.h index 19be73df..9f3aac97 100644 --- a/neo/renderer/qgl.h +++ b/neo/renderer/qgl.h @@ -97,7 +97,7 @@ extern PFNGLACTIVESTENCILFACEEXTPROC qglActiveStencilFaceEXT; // DG: couldn't find any extension for this, it's supported in GL2.0 and newer, incl OpenGL ES2.0 // SE: only the ATI implementation is provided on Mac OS X 10.4 and 10.5 -#if (defined(__MAC_OS_X_VERSION_MIN_REQUIRED) && __MAC_OS_X_VERSION_MIN_REQUIRED <= 1050) +#if OSX_TIGER || OSX_LEOPARD extern PFNGLSTENCILOPSEPARATEATIPROC qglStencilOpSeparate; #else extern PFNGLSTENCILOPSEPARATEPROC qglStencilOpSeparate; diff --git a/neo/sys/platform.h b/neo/sys/platform.h index c5d2455b..59e93f8c 100644 --- a/neo/sys/platform.h +++ b/neo/sys/platform.h @@ -202,6 +202,13 @@ If you have questions concerning this license or the applicable additional terms #ifdef __APPLE__ #include +#ifdef __MAC_OS_X_VERSION_MIN_REQUIRED +#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1040 +#define OSX_TIGER 1 +#elif __MAC_OS_X_VERSION_MIN_REQUIRED < 1060 +#define OSX_LEOPARD 1 +#endif +#endif #endif #define ID_TIME_T time_t diff --git a/neo/sys/posix/posix_main.cpp b/neo/sys/posix/posix_main.cpp index 15f08ba2..9eaa2963 100644 --- a/neo/sys/posix/posix_main.cpp +++ b/neo/sys/posix/posix_main.cpp @@ -401,7 +401,7 @@ int Sys_GetDriveFreeSpace( const char *path ) { static const int crashSigs[] = { SIGILL, SIGABRT, SIGFPE, SIGSEGV }; static const char* crashSigNames[] = { "SIGILL", "SIGABRT", "SIGFPE", "SIGSEGV" }; -#if ( defined(__linux__) && defined(__GLIBC__) ) || defined(__FreeBSD__) || (defined(__APPLE__) && !(__MAC_OS_X_VERSION_MIN_REQUIRED <= 1040)) +#if ( defined(__linux__) && defined(__GLIBC__) ) || defined(__FreeBSD__) || (defined(__APPLE__) && !OSX_TIGER) #define D3_HAVE_BACKTRACE #include #endif