[vtkusers] GPU Memory Detection

ianl ilindsay at insigniamedical.co.uk
Fri Sep 16 04:49:44 EDT 2016


Hi all, I have just been having a poke around in the CMakeLists.txt for the
OpenGL and OpenGL2 directories under the Rendering directory. It seems that
the part that deals with the GPU info list has been replaced by a much
shorter (placeholder?) section:

OpenGL:

# Now to see about the GPU info list.
list(APPEND vtk_module_overrides "vtkGPUInfoList")
if(VTK_USE_NVCONTROL)
  list(APPEND Module_SRCS "vtkXGPUInfoList.cxx")
  set(extra_libs ${NVCtrlLib_LIBRARY})
  include_directories(${NVCtrlLib_INCLUDE_DIR})
  set(vtk_module_vtkGPUInfoList_override "vtkXGPUInfoList")
elseif(VTK_USE_CORE_GRAPHICS)
  list(APPEND Module_SRCS "vtkCoreGraphicsGPUInfoList.cxx")
  set(extra_libs)
  set(vtk_module_vtkGPUInfoList_override "vtkCoreGraphicsGPUInfoList")
elseif(VTK_USE_DIRECTX)
  list(APPEND Module_SRCS "vtkDirectXGPUInfoList.cxx")
  set(extra_libs ${DirectX_LIBRARY} wbemuuid)
  include_directories(${DirectX_INCLUDE_DIR})
  set(vtk_module_vtkGPUInfoList_override "vtkDirectXGPUInfoList")
else()
  # Shouldn't this just be the base class, and the others override if
needed?
  list(APPEND Module_SRCS "vtkDummyGPUInfoList.cxx")
  set(vtk_module_vtkGPUInfoList_override "vtkDummyGPUInfoList")
endif()

has become in OpenGL2:

# Now to see about the GPU info list.
list(APPEND vtk_module_overrides "vtkGPUInfoList")
list(APPEND Module_SRCS "vtkDummyGPUInfoList.cxx")
set(vtk_module_vtkGPUInfoList_override "vtkDummyGPUInfoList")

So could I just copy the relevent classes to the OpenGL2 directory and
update the CMakelists.txt to match (including the bit earlier where the
VTK_USE_DIRECTX flag is worked out)? Alternatively, I could hack the part in
vtkGPUVolumeRayCastMapper to default to a larger number than 128 MB. What is
my best way forward here? I am reluctant to switch back to the old OpenGL
rendering as the speed improvements in the new implementation are very
beneficial.




--
View this message in context: http://vtk.1045678.n5.nabble.com/GPU-Memory-Detection-tp5740281p5740351.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list