Changeset 20908
- Timestamp:
- 11/08/07 21:05:28 (10 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
juggler/branches/2.2/modules/vrjuggler/vrj/Draw/OGL/GlExtensionLoader.cpp
r19901 r20908 28 28 29 29 #include <vpr/vpr.h> 30 #include <vpr/Util/Debug.h>31 30 32 31 #if defined(VPR_OS_Darwin) && defined(VRJ_USE_COCOA) … … 36 35 #endif 37 36 38 #if !defined(WIN32) && !defined(VPR_OS_Darwin)39 # include <GL/glx.h>37 #if defined(VRJ_USE_X11) 38 # include <GL/glx.h> 40 39 #endif 41 40 42 #if defined(VPR_OS_Darwin) 43 #include <mach-o/dyld.h> 44 #elif !defined(WIN32) 45 #include <dlfcn.h> 41 // On Mac OS X 10.3 and older, use the less portable symbol lookup mechanism. 42 #if defined(VPR_OS_Darwin) && VPR_OS_RELEASE_MAJOR < 8 43 # include <mach-o/dyld.h> 44 #elif ! defined(VPR_OS_Windows) 45 # include <dlfcn.h> 46 46 #endif 47 47 48 #include <vpr/Util/Debug.h> 48 49 #include <vrj/Draw/OGL/GlExtensionLoader.h> 49 50 … … 56 57 VoidExtFunc found_func(NULL); 57 58 58 #if defined(VPR_OS_Darwin) 59 // On Mac OS X 10.3 and older, use the less portable symbol lookup 60 // mechanism. 61 #if defined(VPR_OS_Darwin) && VPR_OS_RELEASE_MAJOR < 8 59 62 if (NSIsSymbolNameDefined(name)) 60 63 { … … 65 68 } 66 69 } 67 #elif defined( WIN32)70 #elif defined(VPR_OS_Windows) 68 71 69 72 found_func = (void(__cdecl*)(void)) wglGetProcAddress(name); 70 73 74 // On UNIX variants including Mac OS X 10.4 and newer, use dlopen(3). 71 75 #elif defined(VPR_OS_IRIX) || defined(VPR_OS_HPUX) || \ 72 defined(VPR_OS_Linux) || defined(VPR_OS_FreeBSD) || defined(VPR_OS_Solaris) 76 defined(VPR_OS_Linux) || defined(VPR_OS_FreeBSD) || \ 77 defined(VPR_OS_Solaris) || defined(VPR_OS_Darwin) 73 78 74 79 /* Workaround for multiple nVidia/Linux installation bugs, based on code in OpenSG */ … … 87 92 } 88 93 94 // We only have glX*() functions when we are using X11. 95 #if defined(VRJ_USE_X11) 89 96 if (__GetProcAddress == NULL) 90 97 { … … 111 118 } 112 119 } 120 #endif 113 121 114 122 if (__GetProcAddress != NULL)
