Commit 3042107a authored by David E. DeMarle's avatar David E. DeMarle

allow non osp builds to load state recorded from osp builds

The approach is to always build the PV level osp structures but
have them fall through and do nothing when built without ospray.
parent 89524889
......@@ -569,6 +569,7 @@
{ "class": "vtkPVImplicitPlaneRepresentation" },
{ "class": "vtkPVLastSelectionInformation" },
{ "class": "vtkPVOpenGLInformation" },
{ "class": "vtkPVOSPRayMaterialLibrary" },
{ "class": "vtkPVPlotMatrixView" },
{ "class": "vtkPVProminentValuesInformation" },
{ "class": "vtkPVRenderingCapabilitiesInformation" },
......
......@@ -77,6 +77,7 @@ set (Module_SRCS
vtkPVMultiSliceView.cxx
vtkPVOpenGLInformation.cxx
vtkPVOrthographicSliceView.cxx
vtkPVOSPRayMaterialLibrary.cxx
vtkPVParallelCoordinatesRepresentation.cxx
vtkPVPlotMatrixRepresentation.cxx
vtkPVPlotMatrixView.cxx
......@@ -120,11 +121,6 @@ if (PARAVIEW_USE_ICE_T)
vtkIceTSynchronizedRenderers.cxx)
endif()
if (PARAVIEW_USE_OSPRAY)
list(APPEND Module_SRCS
vtkPVOSPRayMaterialLibrary.cxx)
endif()
if(NOT VTK_LEGACY_REMOVE)
list(APPEND Module_SRCS
vtkPVDisplayInformation.cxx
......
......@@ -23,18 +23,35 @@
#ifndef vtkPVOSPRayMaterialLibrary_h
#define vtkPVOSPRayMaterialLibrary_h
#include "vtkOSPRayMaterialLibrary.h"
#include "vtkPVClientServerCoreRenderingModule.h" //needed for exports
#include "vtkPVConfig.h"
#ifdef PARAVIEW_USE_OSPRAY
#include "vtkOSPRayMaterialLibrary.h"
class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkPVOSPRayMaterialLibrary
: public vtkOSPRayMaterialLibrary
{
public:
static vtkPVOSPRayMaterialLibrary* New();
vtkTypeMacro(vtkPVOSPRayMaterialLibrary, vtkOSPRayMaterialLibrary);
#else
#include "vtkObject.h"
class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkPVOSPRayMaterialLibrary : public vtkObject
{
public:
static vtkPVOSPRayMaterialLibrary* New();
vtkTypeMacro(vtkPVOSPRayMaterialLibrary, vtkObject);
// fake API for OSPRayMaterialLibrary
bool ReadFile(const char*) { return false; };
const char* WriteBuffer() { return nullptr; };
bool ReadBuffer(const char*) { return false; };
#endif
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
/**
* Unlike parent classes ReadFile, this searches in a number of
* Unlike parent class's ReadFile, this searches in a number of
* relative and environmental paths specified by the SearchPaths
* member variable.
*/
......@@ -61,3 +78,4 @@ private:
};
#endif
// VTK-HeaderTest-Exclude: vtkPVOSPRayMaterialLibrary.h
......@@ -60,6 +60,7 @@
#include "vtkPVGridAxes3DActor.h"
#include "vtkPVHardwareSelector.h"
#include "vtkPVInteractorStyle.h"
#include "vtkPVOSPRayMaterialLibrary.h"
#include "vtkPVOptions.h"
#include "vtkPVServerInformation.h"
#include "vtkPVSession.h"
......@@ -102,7 +103,6 @@
#ifdef PARAVIEW_USE_OSPRAY
#include "vtkOSPRayLightNode.h"
#include "vtkOSPRayMaterialLibrary.h"
#include "vtkOSPRayPass.h"
#include "vtkOSPRayRendererNode.h"
#endif
......@@ -2984,7 +2984,7 @@ bool vtkPVRenderView::GetEnableOSPRay()
}
//----------------------------------------------------------------------------
void vtkPVRenderView::SetMaterialLibrary(vtkOSPRayMaterialLibrary* ml)
void vtkPVRenderView::SetMaterialLibrary(vtkPVOSPRayMaterialLibrary* ml)
{
#ifdef PARAVIEW_USE_OSPRAY
vtkRenderer* ren = this->GetRenderer();
......
......@@ -49,7 +49,6 @@ class vtkInteractorStyleRubberBandZoom;
class vtkLight;
class vtkLightKit;
class vtkMatrix4x4;
class vtkOSPRayMaterialLibrary;
class vtkPartitionOrderingInterface;
class vtkProp;
class vtkPVAxesWidget;
......@@ -60,6 +59,7 @@ class vtkPVDataRepresentation;
class vtkPVGridAxes3DActor;
class vtkPVHardwareSelector;
class vtkPVInteractorStyle;
class vtkPVOSPRayMaterialLibrary;
class vtkPVSynchronizedRenderer;
class vtkRenderer;
class vtkRenderViewBase;
......@@ -890,7 +890,7 @@ public:
/**
* For OSPRay, set the library of materials.
*/
virtual void SetMaterialLibrary(vtkOSPRayMaterialLibrary*);
virtual void SetMaterialLibrary(vtkPVOSPRayMaterialLibrary*);
//@{
/**
......
......@@ -104,6 +104,7 @@ SET(requestedResourceFiles
${CMAKE_CURRENT_SOURCE_DIR}/Resources/views_and_representations.xml
${CMAKE_CURRENT_SOURCE_DIR}/Resources/writers.xml
${CMAKE_CURRENT_SOURCE_DIR}/Resources/proxies_opengl2.xml # has to be after views_and_representations
${CMAKE_CURRENT_SOURCE_DIR}/Resources/proxies_ospray.xml
${module_sm_xmls}
)
if (PARAVIEW_USE_MPI)
......@@ -154,12 +155,6 @@ if (PARAVIEW_USE_OPENTURNS)
${CMAKE_CURRENT_SOURCE_DIR}/Resources/proxies_openturns.xml)
endif()
if (PARAVIEW_USE_OSPRAY)
list(APPEND requestedResourceFiles
${CMAKE_CURRENT_SOURCE_DIR}/Resources/proxies_ospray.xml)
endif()
#------------------------------------------------------------------------------
if (PARAVIEW_ENABLE_PYTHON)
......
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