Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Patch the volume rendering factory.

Always need OpenGL for volume rendering.
  • Loading branch information...
commit 1c176cfeba62c1a26db6514030daafd53cf275e3 1 parent d265919
@cryos cryos authored
Showing with 42 additions and 0 deletions.
  1. +39 −0 modular/RenderingVolume.patch
  2. +3 −0  modular/manifest.txt
View
39 modular/RenderingVolume.patch
@@ -0,0 +1,39 @@
+diff --git a/Rendering/Volume/vtkVolumeRenderingFactory.cxx b/Rendering/Volume/vtkVolumeRenderingFactory.cxx
+index 98cc598..d4a4f61 100644
+--- a/Rendering/Volume/vtkVolumeRenderingFactory.cxx
++++ b/Rendering/Volume/vtkVolumeRenderingFactory.cxx
+@@ -20,7 +20,6 @@
+ #include "vtkGraphicsFactory.h"
+
+ // if using some sort of opengl, then include these files
+-#if defined(VTK_USE_OGLR) || defined(VTK_USE_OSMESA) ||defined(_WIN32) || defined(VTK_USE_COCOA) || defined(VTK_USE_CARBON)
+ #include "vtkOpenGLGPUVolumeRayCastMapper.h"
+ #include "vtkOpenGLHAVSVolumeMapper.h"
+ #include "vtkOpenGLProjectedAAHexahedraMapper.h"
+@@ -28,7 +27,6 @@
+ #include "vtkOpenGLRayCastImageDisplayHelper.h"
+ #include "vtkOpenGLVolumeTextureMapper2D.h"
+ #include "vtkOpenGLVolumeTextureMapper3D.h"
+-#endif
+
+ #include "vtkCriticalSection.h"
+
+@@ -53,9 +51,7 @@ vtkObject* vtkVolumeRenderingFactory::CreateInstance(const char* vtkclassname )
+ #endif
+ const char *rl = vtkGraphicsFactory::GetRenderLibrary();
+
+-
+-#if defined(VTK_USE_OGLR) || defined(VTK_USE_OSMESA) ||defined(_WIN32) || defined(VTK_USE_COCOA) || defined(VTK_USE_CARBON)
+- if (!strcmp("OpenGL",rl) || !strcmp("Win32OpenGL",rl) || !strcmp("CarbonOpenGL",rl) || !strcmp("CocoaOpenGL",rl))
++// if (!strcmp("OpenGL",rl) || !strcmp("Win32OpenGL",rl) || !strcmp("CarbonOpenGL",rl) || !strcmp("CocoaOpenGL",rl))
+ {
+ // GPU Ray Cast Mapper
+ if(strcmp(vtkclassname, "vtkGPUVolumeRayCastMapper") == 0)
+@@ -99,7 +95,6 @@ vtkObject* vtkVolumeRenderingFactory::CreateInstance(const char* vtkclassname )
+ return vtkOpenGLRayCastImageDisplayHelper::New();
+ }
+ }
+-#endif
+
+ return 0;
+ }
View
3  modular/manifest.txt
@@ -5710,8 +5710,11 @@ modular/Rendering/TDx/CMakeLists.txt:<ignore>
modular/Rendering/TDx/module.cmake:<ignore>
[Rendering/Volume]
+
modular/Rendering/Volume/module.cmake:
modular/Rendering/Volume/CMakeLists.txt:
+modular/RenderingVolume.patch:<ignore>
+<patch>: RenderingVolume.patch
VolumeRendering/vtkDirectionEncoder.cxx:
VolumeRendering/vtkDirectionEncoder.h:

0 comments on commit 1c176cf

Please sign in to comment.
Something went wrong with that request. Please try again.