From 4b573c7ecdf1798893355b011e18e4b72b1a315c Mon Sep 17 00:00:00 2001 From: Gerard Ziemski Date: Wed, 18 Jan 2006 21:37:07 +0000 Subject: add support for availability macros and use them to substitue values in case of nondefined ones git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@550 232f8b59-042b-4e1e-8c03-345bb8c30851 --- src/native/jogl/MacOSXWindowSystemInterface.m | 30 +++++++++++++++++---------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'src/native') diff --git a/src/native/jogl/MacOSXWindowSystemInterface.m b/src/native/jogl/MacOSXWindowSystemInterface.m index e554379ec..e56eaa20c 100644 --- a/src/native/jogl/MacOSXWindowSystemInterface.m +++ b/src/native/jogl/MacOSXWindowSystemInterface.m @@ -1,3 +1,14 @@ +#include + +#ifndef MAC_OS_X_VERSION_10_3 + #error building JOGL requires Mac OS X 10.3 or greater +#endif + +#ifndef MAC_OS_X_VERSION_10_4 + #define NSOpenGLPFAColorFloat kCGLPFAColorFloat + #define kCGLNoError 0 +#endif + #import #import #import @@ -33,21 +44,21 @@ void getRendererInfo() CGLRendererInfoObj info; long numRenderers = 0; CGLError err = CGLQueryRendererInfo(CGDisplayIDToOpenGLDisplayMask(kCGDirectMainDisplay), &info, &numRenderers); - if (err == 0 /* kCGLNoError not available on 10.3 */) + if (err == kCGLNoError) { CGLDescribeRenderer(info, 0, kCGLRPRendererCount, &numRenderers); long j; for (j=0; j