Commit 639c5721 authored by François Bertel's avatar François Bertel Committed by David Partyka
Browse files

COMP:Fixed for OSMesa with VTK_USE_X OFF.

parent 63f7c12e
...@@ -257,8 +257,8 @@ vtkOpenGLExtensionManager::GetProcAddress(const char *fname) ...@@ -257,8 +257,8 @@ vtkOpenGLExtensionManager::GetProcAddress(const char *fname)
#endif //MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3 #endif //MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_3
#endif //VTK_USE_APPLE_LOADER #endif //VTK_USE_APPLE_LOADER
#ifdef VTK_USE_X
#ifdef VTK_USE_GLX_GET_PROC_ADDRESS #ifdef VTK_USE_GLX_GET_PROC_ADDRESS
// In a perfect world, it should be // In a perfect world, it should be
// return static_cast<vtkOpenGLExtensionManagerFunctionPointer>(glXGetProcAddress(reinterpret_cast<const GLubyte *>(fname))); // return static_cast<vtkOpenGLExtensionManagerFunctionPointer>(glXGetProcAddress(reinterpret_cast<const GLubyte *>(fname)));
// but glx.h of Solaris 10 has line 209 wrong: it is // but glx.h of Solaris 10 has line 209 wrong: it is
...@@ -266,11 +266,11 @@ vtkOpenGLExtensionManager::GetProcAddress(const char *fname) ...@@ -266,11 +266,11 @@ vtkOpenGLExtensionManager::GetProcAddress(const char *fname)
// when it should be: // when it should be:
// extern void (*glXGetProcAddress(const GLubyte *procname))(void); // extern void (*glXGetProcAddress(const GLubyte *procname))(void);
return reinterpret_cast<vtkOpenGLExtensionManagerFunctionPointer>(glXGetProcAddress(reinterpret_cast<const GLubyte *>(fname))); return reinterpret_cast<vtkOpenGLExtensionManagerFunctionPointer>(glXGetProcAddress(reinterpret_cast<const GLubyte *>(fname)));
#endif //VTK_USE_GLX_GET_PROC_ADDRESS #endif //VTK_USE_GLX_GET_PROC_ADDRESS
#ifdef VTK_USE_GLX_GET_PROC_ADDRESS_ARB #ifdef VTK_USE_GLX_GET_PROC_ADDRESS_ARB
return reinterpret_cast<vtkOpenGLExtensionManagerFunctionPointer>(glXGetProcAddressARB(reinterpret_cast<const GLubyte *>(fname))); return reinterpret_cast<vtkOpenGLExtensionManagerFunctionPointer>(glXGetProcAddressARB(reinterpret_cast<const GLubyte *>(fname)));
#endif //VTK_USE_GLX_GET_PROC_ADDRESS_ARB #endif //VTK_USE_GLX_GET_PROC_ADDRESS_ARB
#endif
#ifdef VTK_USE_VTK_DYNAMIC_LOADER #ifdef VTK_USE_VTK_DYNAMIC_LOADER
// If the GLX implementation cannot load procedures for us, load them // If the GLX implementation cannot load procedures for us, load them
......
...@@ -145,7 +145,9 @@ ...@@ -145,7 +145,9 @@
/* Setup VTK based on platform features and configuration. */ /* Setup VTK based on platform features and configuration. */
/* OGLR */ /* OGLR */
#if ((defined(VTK_USE_OPENGL_LIBRARY) && !defined(_WIN32)) || \ /* OGLR is for GLX. It can be on Unix, Mac or Windows */
#if ((defined(VTK_USE_OPENGL_LIBRARY) && defined(VTK_USE_X) && \
!defined(_WIN32)) || \
(defined(VTK_USE_X) && defined(_WIN32)) || \ (defined(VTK_USE_X) && defined(_WIN32)) || \
(defined(VTK_USE_MANGLED_MESA) && !defined(_WIN32))) && \ (defined(VTK_USE_MANGLED_MESA) && !defined(_WIN32))) && \
!(defined (VTK_USE_CARBON) || defined(VTK_USE_COCOA)) !(defined (VTK_USE_CARBON) || defined(VTK_USE_COCOA))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment