Changeset 20907
- Timestamp:
- 11/08/07 21:03:07 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
juggler/trunk/modules/vrjuggler/vrj/Draw/OpenGL/ExtensionLoader.cpp
r20495 r20907 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/OpenGL/ExtensionLoader.h> 49 50 … … 60 61 VoidExtFunc found_func(NULL); 61 62 62 #if defined(VPR_OS_Darwin) 63 // On Mac OS X 10.3 and older, use the less portable symbol lookup 64 // mechanism. 65 #if defined(VPR_OS_Darwin) && VPR_OS_RELEASE_MAJOR < 8 63 66 if ( NSIsSymbolNameDefined(name) ) 64 67 { … … 69 72 } 70 73 } 71 #elif defined( WIN32)74 #elif defined(VPR_OS_Windows) 72 75 73 76 found_func = (void(__cdecl*)(void)) wglGetProcAddress(name); 74 77 78 // On UNIX variants including Mac OS X 10.4 and newer, use dlopen(3). 75 79 #elif defined(VPR_OS_IRIX) || defined(VPR_OS_HPUX) || \ 76 80 defined(VPR_OS_Linux) || defined(VPR_OS_FreeBSD) || \ 77 defined(VPR_OS_Solaris) 81 defined(VPR_OS_Solaris) || defined(VPR_OS_Darwin) 78 82 79 83 // Workaround for multiple nVidia/Linux installation bugs, based on code in … … 94 98 } 95 99 100 // We only have glX*() functions when we are using X11. 101 #if defined(VRJ_USE_X11) 96 102 if (__GetProcAddress == NULL) 97 103 { … … 127 133 } 128 134 } 135 #endif 129 136 130 137 if ( __GetProcAddress != NULL )
