Commit 798d328c authored by Shawn Waldon's avatar Shawn Waldon

Remove support for VTK's OpenGL rendering backend

parent bf0da6ec
......@@ -57,9 +57,6 @@ endif()
set(SUPPORT_STATIC_PLUGINS TRUE)
set(title "ParaView ${PARAVIEW_VERSION_FULL} ${PARAVIEW_BUILD_ARCHITECTURE}-bit")
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL")
set(title "${title} (Legacy Rendering Backend)")
endif()
#------------------------------------------------------------------------------
# Build the client
build_paraview_client(paraview
......
......@@ -75,9 +75,7 @@ set(PVBATCH_TESTS
)
# Tests only concerning GL2.
if ("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2")
list(APPEND PVBATCH_TESTS VolumeCellSelection.py)
endif ()
list(APPEND PVBATCH_TESTS VolumeCellSelection.py)
foreach (tfile IN LISTS PVBATCH_TESTS)
get_filename_component(test ${tfile} NAME_WE)
......
......@@ -436,18 +436,16 @@ if(NOT APPLE)
)
endif()
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2")
list(APPEND TESTS_WITH_BASELINES
# This test makes use of "Point Gaussian" representation, only available with OpenGL2
${CMAKE_CURRENT_SOURCE_DIR}/BackgroundColorCheck.xml
list(APPEND TESTS_WITH_BASELINES
# This test makes use of "Point Gaussian" representation, only available with OpenGL2
${CMAKE_CURRENT_SOURCE_DIR}/BackgroundColorCheck.xml
# PlotMatrixView is bugging in OpenGL1
${CMAKE_CURRENT_SOURCE_DIR}/PlotMatrixViewArraySelection.xml
# PlotMatrixView is bugging in OpenGL1
${CMAKE_CURRENT_SOURCE_DIR}/PlotMatrixViewArraySelection.xml
# Composite Glyph Trees are only implemented in OpenGL2
${CMAKE_CURRENT_SOURCE_DIR}/CompositeGlyphTree.xml
)
endif()
# Composite Glyph Trees are only implemented in OpenGL2
${CMAKE_CURRENT_SOURCE_DIR}/CompositeGlyphTree.xml
)
if (PARAVIEW_USE_MPI)
list(APPEND TESTS_WITH_BASELINES
......@@ -554,9 +552,7 @@ if(PARAVIEW_ENABLE_PYTHON)
${CMAKE_CURRENT_SOURCE_DIR}/TestFindDataMax.xml)
list(APPEND TESTS_WITH_INLINE_COMPARES
${CMAKE_CURRENT_SOURCE_DIR}/FindDataDialog.xml)
endif()
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2" AND numpy_found)
# Cinema importing capabilities are only available in Python + OpenGL2
# add the cinema database files.
paraview_test_load_data("" "cinema-composite.cdb/image/info.json")
......
......@@ -47,8 +47,8 @@ set(_vtk_modules
vtkRenderingVolume
vtkRenderingLabel
vtkRenderingFreeType
vtkRenderingVolume${VTK_RENDERING_BACKEND}
vtkRendering${VTK_RENDERING_BACKEND}
vtkRenderingVolumeOpenGL2
vtkRenderingOpenGL2
vtkRenderingLOD
vtkRenderingContext2D
vtkRenderingAnnotation
......@@ -363,16 +363,11 @@ set(_vtk_modules
# needed for H5PartReader support
)
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL")
list(APPEND _vtk_modules vtkRenderingLIC vtkIOExport)
list(APPEND _vtk_mpi_modules vtkRenderingParallelLIC)
else()
list(APPEND _vtk_modules vtkRenderingLICOpenGL2)
list(APPEND _vtk_modules vtkDomainsChemistryOpenGL2)
list(APPEND _vtk_mpi_modules vtkRenderingParallelLIC)
if(PARAVIEW_ENABLE_PYTHON)
list (APPEND _vtk_modules vtkPVCinemaReader)
endif()
list(APPEND _vtk_modules vtkRenderingLICOpenGL2)
list(APPEND _vtk_modules vtkDomainsChemistryOpenGL2)
list(APPEND _vtk_mpi_modules vtkRenderingParallelLIC)
if(PARAVIEW_ENABLE_PYTHON)
list (APPEND _vtk_modules vtkPVCinemaReader)
endif()
if (PARAVIEW_ENABLE_XDMF2)
......
......@@ -628,13 +628,10 @@ mark_as_advanced(PARAVIEW_EXTERNAL_MODULE_ROOTS)
include(ParaViewModuleTop)
#----------------------------------------------------------------------------------
# Sanity check: OpenGL2 backend is required for Qt 5.
if(PARAVIEW_BUILD_QT_GUI
AND PARAVIEW_QT_VERSION VERSION_GREATER "4"
AND VTK_RENDERING_BACKEND STREQUAL "OpenGL")
# Sanity check: OpenGL backend is no longer supported
if (VTK_RENDERING_BACKEND STREQUAL "OpenGL")
message(SEND_ERROR
"ParaView requires 'OpenGL2' rendering backend when building with Qt 5. "
"Please set VTK_RENDERING_BACKEND to 'OpenGL2' (recommended) or build with Qt 4.")
"ParaView no longer supports the 'OpenGL' rendering backend.")
endif()
#----------------------------------------------------------------------------------
......
......@@ -40,7 +40,7 @@
},
{ "name":"VTK_RENDERING_BACKEND",
"type":"STRING",
"value":"OpenGL"
"value":"OpenGL2"
}
]
},
......
......@@ -13,9 +13,7 @@ set_source_files_properties(
vtkPVView
ABSTRACT)
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2")
add_definitions(-DVTKGL2)
endif()
add_definitions(-DVTKGL2)
#set (${vtk-module}_HDRS vtkStreamingPriorityQueue.h)
......
......@@ -6,9 +6,7 @@ foreach (cmake_file IN LISTS cmake_files)
include("${cmake_file}")
endforeach ()
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2")
add_definitions(-DVTKGL2)
endif()
add_definitions(-DVTKGL2)
# Use a custom hints file for this module.
#set(${vtk-module}_WRAP_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/hints")
......
......@@ -6,9 +6,7 @@ foreach (cmake_file IN LISTS cmake_files)
include("${cmake_file}")
endforeach ()
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2")
add_definitions(-DVTKGL2)
endif()
add_definitions(-DVTKGL2)
#-----------------------------------------------------------------------------
# Stuff for ObjectFactory override for vtkSMParaViewPipelineControllerWithRendering.
list(APPEND Module_SRCS
......
......@@ -6,9 +6,7 @@ foreach (cmake_file IN LISTS cmake_files)
include("${cmake_file}")
endforeach ()
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2")
add_definitions(-DVTKGL2)
endif()
add_definitions(-DVTKGL2)
vtk_module_library(vtkPVVTKExtensionsRendering ${Module_SRCS})
vtk_mpi_link(vtkPVVTKExtensionsRendering)
......@@ -16,14 +16,7 @@ endif()
if (PARAVIEW_ENABLE_QT_SUPPORT)
list(APPEND __dependencies vtkGUISupportQt)
endif()
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL")
#list(APPEND __dependencies vtkRenderingLIC)
if (PARAVIEW_USE_MPI)
#list (APPEND __dependencies vtkRenderingParallelLIC)
endif()
else()
list(APPEND __dependencies vtkglew)
endif()
list(APPEND __dependencies vtkglew)
if(PARAVIEW_USE_OSPRAY)
#list(APPEND __dependencies vtkRenderingOSPRay)
......@@ -40,13 +33,13 @@ if (Module_vtkRenderingCore)
vtkFiltersParallel
vtkFiltersParallelMPI
vtkIOExport
vtkIOExport${VTK_RENDERING_BACKEND}
vtkIOExportOpenGL2
vtkIOImage
vtkIOXML
vtkInteractionStyle
vtkParallelMPI
vtkRenderingAnnotation
vtkRendering${VTK_RENDERING_BACKEND}
vtkRenderingOpenGL2
vtkRenderingParallel
vtkicet
vtklz4)
......
......@@ -30,9 +30,7 @@ foreach(file ${shader_files})
)
endforeach()
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2")
add_definitions(-DVTK_OPENGL2)
endif()
add_definitions(-DVTK_OPENGL2)
include(vtkOpenGL)
vtk_module_library(vtkRenderingParallel ${Module_SRCS})
......
......@@ -92,10 +92,6 @@
{ "name": "Module_vtkImagingColor",
"type": "BOOL",
"value": "ON"
},
{ "name": "VTK_RENDERING_BACKEND",
"type": "STRING",
"value": "OpenGL2"
}
]
},
......
set(Module_SRCS)
file(GLOB cmake_files "${CMAKE_CURRENT_SOURCE_DIR}/*.catalyst.cmake")
foreach (cmake_file IN LISTS cmake_files)
include("${cmake_file}")
endforeach ()
set_source_files_properties(
# vtkPVContextView
# vtkPVDataRepresentation
# vtkPVSynchronizedRenderWindows
vtkPVView
ABSTRACT)
#set (${vtk-module}_HDRS vtkStreamingPriorityQueue.h)
# Use a custom hints file for this module.
#set(${vtk-module}_WRAP_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/hints")
vtk_module_library(vtkPVClientServerCoreRendering ${Module_SRCS})
set (__dependencies)
if (PARAVIEW_USE_PISTON)
list (APPEND __dependencies vtkAcceleratorsPiston)
endif()
vtk_module(vtkPVClientServerCoreRendering
GROUPS
ParaViewRendering
DEPENDS
#vtkDomainsChemistry
#vtkFiltersAMR
vtkPVClientServerCoreCore
vtkPVVTKExtensionsDefault
vtkPVVTKExtensionsRendering
#vtkWebGLExporter
vtkRenderingLabel
#vtkRenderingVolumeAMR
#vtkRenderingVolumeOpenGL
vtkViewsContext2D
vtkViewsCore
${__dependencies}
PRIVATE_DEPENDS
vtksys
vtkzlib
TEST_LABELS
PARAVIEW
KIT
vtkPVClientServer
)
set(Module_SRCS)
file(GLOB cmake_files "${CMAKE_CURRENT_SOURCE_DIR}/*.catalyst.cmake")
foreach (cmake_file IN LISTS cmake_files)
include("${cmake_file}")
endforeach ()
# Use a custom hints file for this module.
#set(${vtk-module}_WRAP_HINTS "${CMAKE_CURRENT_SOURCE_DIR}/hints")
vtk_module_library(vtkPVServerImplementationRendering ${Module_SRCS})
set(Module_SRCS)
file(GLOB cmake_files "${CMAKE_CURRENT_SOURCE_DIR}/*.catalyst.cmake")
foreach (cmake_file IN LISTS cmake_files)
include("${cmake_file}")
endforeach ()
vtk_module_library(vtkPVServerManagerDefault ${Module_SRCS})
# If FFMPEG support is enabled, we need to depend on FFMPEG.
set (__extra_dependencies)
if (PARAVIEW_ENABLE_FFMPEG)
list(APPEND __extra_dependencies vtkIOFFMPEG)
endif()
vtk_module(vtkPVServerManagerDefault
DEPENDS
#vtkIOMovie
#vtkIOParallelExodus
#vtkPVServerImplementationDefault
vtkPVServerManagerRendering
#vtkRenderingVolumeOpenGL
#vtkTestingRendering
${__extra_dependencies}
PRIVATE_DEPENDS
vtksys
TEST_DEPENDS
vtkPVServerManagerApplication
TEST_LABELS
PARAVIEW
KIT
vtkPVServerManager
)
unset(__extra_dependencies)
set(Module_SRCS)
file(GLOB cmake_files "${CMAKE_CURRENT_SOURCE_DIR}/*.catalyst.cmake")
foreach (cmake_file IN LISTS cmake_files)
include("${cmake_file}")
endforeach ()
#-----------------------------------------------------------------------------
# Stuff for ObjectFactory override for vtkSMParaViewPipelineControllerWithRendering.
list(APPEND Module_SRCS
${CMAKE_CURRENT_BINARY_DIR}/${vtk-module}ObjectFactory.cxx)
set_source_files_properties(${vtk-module}ObjectFactory WRAP_EXCLUDE)
# Override some rendering classes. Create object factory:
set(vtk_module_overrides "vtkSMParaViewPipelineController")
set(vtk_module_vtkSMParaViewPipelineController_override
"vtkSMParaViewPipelineControllerWithRendering")
# Now we iterate and create that class file...
foreach(_class ${vtk_module_overrides})
set(_override ${vtk_module_${_class}_override})
set(_vtk_override_includes "${_vtk_override_includes}
#include \"${_override}.h\"")
set(_vtk_override_creates "${_vtk_override_creates}
VTK_CREATE_CREATE_FUNCTION(${_override})")
set(_vtk_override_do "${_vtk_override_do}
this->RegisterOverride(\"${_class}\",
\"${_override}\",
\"Override for ${vtk-module} module\", 1,
vtkObjectFactoryCreate${_override});")
endforeach()
# Now lets create the object factory classes
string(TOUPPER ${vtk-module} VTK-MODULE)
configure_file(${VTK_CMAKE_DIR}/vtkObjectFactory.h.in
${CMAKE_CURRENT_BINARY_DIR}/${vtk-module}ObjectFactory.h)
configure_file(${VTK_CMAKE_DIR}/vtkObjectFactory.cxx.in
${CMAKE_CURRENT_BINARY_DIR}/${vtk-module}ObjectFactory.cxx)
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Compile ColorMaps.json
add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/vtkSMTransferFunctionPresetsBuiltin.h
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ColorMaps.json
kwProcessXML
COMMAND kwProcessXML
${CMAKE_CURRENT_BINARY_DIR}/vtkSMTransferFunctionPresetsBuiltin.h
vtkSMTransferFunctionPresets JSON JSON
${CMAKE_CURRENT_SOURCE_DIR}/ColorMaps.json
COMMENT "Processing builtin color maps")
set(${vtk-module}_HDRS
${CMAKE_CURRENT_BINARY_DIR}/vtkSMTransferFunctionPresetsBuiltin.h)
set_source_files_properties(
${CMAKE_CURRENT_BINARY_DIR}/vtkSMTransferFunctionPresetsBuiltin.h
HEADER_FILE_ONLY
WRAP_EXCLUDE)
#-----------------------------------------------------------------------------
vtk_module_library(vtkPVServerManagerRendering ${Module_SRCS})
set(Module_SRCS)
file(GLOB cmake_files "${CMAKE_CURRENT_SOURCE_DIR}/*.catalyst.cmake")
foreach (cmake_file IN LISTS cmake_files)
include("${cmake_file}")
endforeach ()
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL2")
add_definitions(-DVTKGL2)
endif()
vtk_module_library(vtkPVVTKExtensionsRendering ${Module_SRCS})
vtk_mpi_link(vtkPVVTKExtensionsRendering)
# Encode glsl files.
foreach (file vtkIceTCompositeZPassShader_fs.glsl)
get_filename_component(file_we ${file} NAME_WE)
set(src ${CMAKE_CURRENT_SOURCE_DIR}/${file})
set(res ${CMAKE_CURRENT_BINARY_DIR}/${file_we}.cxx)
set(resh ${CMAKE_CURRENT_BINARY_DIR}/${file_we}.h)
list(APPEND shader_h_files ${resh})
add_custom_command(
OUTPUT ${res} ${resh}
DEPENDS ${src} vtkEncodeString
COMMAND vtkEncodeString
ARGS ${res} ${src} ${file_we} --build-header
VTKPVVTKEXTENSIONSRENDERING_EXPORT vtkPVVTKExtensionsRenderingModule.h
)
list(APPEND Module_SRCS ${res})
set_source_files_properties(${file_we} WRAP_EXCLUDE)
endforeach()
set (__dependencies)
if (PARAVIEW_USE_MPI)
#set (__dependencies vtkFiltersParallelMPI)
if (PARAVIEW_USE_ICE_T)
#list(APPEND __dependencies vtkicet)
endif()
# needed for mpich
add_definitions("-DMPICH_IGNORE_CXX_SEEK")
endif()
if(PARAVIEW_ENABLE_PYTHON)
#list(APPEND __dependencies vtkRenderingMatplotlib)
endif()
if (PARAVIEW_ENABLE_QT_SUPPORT)
list(APPEND __dependencies vtkGUISupportQt)
endif()
if("${VTK_RENDERING_BACKEND}" STREQUAL "OpenGL")
#list(APPEND __dependencies vtkRenderingLIC)
if (PARAVIEW_USE_MPI)
#list (APPEND __dependencies vtkRenderingParallelLIC)
endif()
else()
list(APPEND __dependencies vtkglew)
endif()
if(PARAVIEW_USE_OSPRAY)
#list(APPEND __dependencies vtkRenderingOSPRay)
endif()
if (Module_vtkRenderingCore)
list(APPEND __dependencies
vtkChartsCore
vtkCommonColor
vtkCommonComputationalGeometry
vtkFiltersExtraction
vtkFiltersGeneric
vtkFiltersHyperTree
vtkFiltersParallel
vtkFiltersParallelMPI
vtkIOExport
vtkIOExport${VTK_RENDERING_BACKEND}
vtkIOImage
vtkIOXML
vtkInteractionStyle
vtkParallelMPI
vtkRenderingAnnotation
vtkRendering${VTK_RENDERING_BACKEND}
vtkRenderingParallel
vtkicet
vtklz4)
endif ()
vtk_module(vtkPVVTKExtensionsRendering
GROUPS
Qt
ParaViewRendering
DEPENDS
vtkFiltersExtraction
vtkFiltersSources
vtkPVVTKExtensionsCore
${__dependencies}
COMPILE_DEPENDS
TEST_DEPENDS
vtkInteractionStyle
vtkIOAMR
vtkIOXML
vtkTestingRendering
TEST_LABELS
PARAVIEW
KIT
vtkPVExtensions
)
if (EXISTS ${PVPYTHON_EXE})
add_test(NAME import-rendering-base
COMMAND ${PVPYTHON_EXE} ${CMAKE_CURRENT_SOURCE_DIR}/use-rendering-base.py)
set_tests_properties(import-rendering-base
PROPERTIES
FAIL_REGULAR_EXPRESSION "No proxy that matches:")
endif ()
from paraview.simple import *
Sphere()
Show()
Render()
WriteImage('rendering-base.png')
set(Module_SRCS)
file(GLOB cmake_files "${CMAKE_CURRENT_SOURCE_DIR}/*.catalyst.cmake")
foreach (cmake_file IN LISTS cmake_files)
include("${cmake_file}")
endforeach ()
set_source_files_properties(
vtkContextPolygon.cxx
WRAP_EXCLUDE)
vtk_module_library(vtkChartsCore ${Module_SRCS})
set(Module_SRCS)
file(GLOB cmake_files "${CMAKE_CURRENT_SOURCE_DIR}/*.catalyst.cmake")
foreach (cmake_file IN LISTS cmake_files)
include("${cmake_file}")
endforeach ()
vtk_module_library(vtkCommonComputationalGeometry ${Module_SRCS})
set(Module_SRCS)
file(GLOB cmake_files "${CMAKE_CURRENT_SOURCE_DIR}/*.catalyst.cmake")
foreach (cmake_file IN LISTS cmake_files)
include("${cmake_file}")
endforeach ()
vtk_module_library(vtkFiltersGeneric ${Module_SRCS})
set(Module_SRCS)
file(GLOB cmake_files "${CMAKE_CURRENT_SOURCE_DIR}/*.catalyst.cmake")
foreach (cmake_file IN LISTS cmake_files)
include("${cmake_file}")
endforeach ()
vtk_module_library(vtkFiltersHyperTree ${Module_SRCS})
set(Module_SRCS)
file(GLOB cmake_files "${CMAKE_CURRENT_SOURCE_DIR}/*.catalyst.cmake")
foreach (cmake_file IN LISTS cmake_files)
include("${cmake_file}")
endforeach ()
vtk_module_library(vtkFiltersModeling ${Module_SRCS})
set(Module_SRCS)
file(GLOB cmake_files "${CMAKE_CURRENT_SOURCE_DIR}/*.catalyst.cmake")
foreach (cmake_file IN LISTS cmake_files)
include("${cmake_file}")
endforeach ()
vtk_module_library(vtkFiltersParallel ${Module_SRCS})
vtk_module(vtkFiltersParallel
GROUPS
StandAlone
DEPENDS
vtkParallelCore
vtkFiltersExtraction
vtkRenderingCore
#vtkFiltersModeling
vtkFiltersGeometry
TEST_DEPENDS
vtkParallelMPI
vtkTestingRendering
vtkInteractionStyle
vtkRenderingOpenGL
vtkRenderingParallel
vtkFiltersParallelMPI
vtkFiltersParallelImaging
vtkIOLegacy
KIT
vtkParallel
)
set(Module_SRCS)
file(GLOB cmake_files "${CMAKE_CURRENT_SOURCE_DIR}/*.catalyst.cmake")
foreach (cmake_file IN LISTS cmake_files)
include("${cmake_file}")
endforeach ()
vtk_module_library(vtkFiltersParallelMPI ${Module_SRCS})
set(Module_SRCS)
file(GLOB cmake_files "${CMAKE_CURRENT_SOURCE_DIR}/*.catalyst.cmake")
foreach (cmake_file IN LISTS cmake_files)
include("${cmake_file}")
endforeach ()