Commit e37f667b authored by David E. DeMarle's avatar David E. DeMarle Committed by Kitware Robot
Browse files

Merge topic 'raytrace-backends-restricted-to-available-REL' into release

6ce813a3 restrict the raytracer backends to what is actually available
da0a15a9

 bump VTK to get API for runtime raytracer detection
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !3424
parents 2d4c794a 6ce813a3
Pipeline #141957 failed with stage
in 0 seconds
......@@ -57,6 +57,7 @@ set(classes
vtkSMPlotMatrixViewProxy
vtkSMRangedTransferFunctionDomain
vtkSMRenderViewProxy
vtkSMRendererDomain
vtkSMRepresentationProxy
vtkSMRepresentationTypeDomain
vtkSMRepresentedArrayListDomain
......
/*=========================================================================
Program: ParaView
Module: vtkSMRendererDomain.cxx
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#include "vtkSMRendererDomain.h"
#if VTK_MODULE_ENABLE_VTK_RenderingRayTracing
#include "vtkOSPRayPass.h"
#endif
#include "vtkObjectFactory.h"
#include "vtkSMProperty.h"
#include "vtkStdString.h"
//---------------------------------------------------------------------------
vtkStandardNewMacro(vtkSMRendererDomain);
//---------------------------------------------------------------------------
void vtkSMRendererDomain::PrintSelf(ostream& os, vtkIndent indent)
{
this->Superclass::PrintSelf(os, indent);
}
//---------------------------------------------------------------------------
int vtkSMRendererDomain::ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* element)
{
#if VTK_MODULE_ENABLE_VTK_RenderingRayTracing
int retVal = this->Superclass::ReadXMLAttributes(prop, element);
if (!retVal)
{
return 0;
}
// throw away whatever XML said our strings are and call update instead
this->Update(nullptr);
#else
(void)prop;
(void)element;
#endif
return 1;
}
//---------------------------------------------------------------------------
void vtkSMRendererDomain::Update(vtkSMProperty* vtkNotUsed(prop))
{
#if VTK_MODULE_ENABLE_VTK_RenderingRayTracing
// populate my list
std::vector<vtkStdString> sa;
if (vtkOSPRayPass::IsBackendAvailable("OSPRay raycaster"))
{
sa.push_back(vtkStdString("OSPRay raycaster"));
}
if (vtkOSPRayPass::IsBackendAvailable("OSPRay pathtracer"))
{
sa.push_back(vtkStdString("OSPRay pathtracer"));
}
if (vtkOSPRayPass::IsBackendAvailable("OptiX pathtracer"))
{
sa.push_back(vtkStdString("OptiX pathtracer"));
}
this->SetStrings(sa);
#endif
}
/*=========================================================================
Program: ParaView
Module: vtkSMRendererDomain.h
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/**
* @class vtkSMRendererDomain
* @brief Manages the list of available ray traced renderers
* This domain builds the list of ray traced renderer backends on the
* View section of the Qt GUI.
*/
#ifndef vtkSMRendererDomain_h
#define vtkSMRendererDomain_h
#include "vtkPVServerManagerRenderingModule.h" //needed for exports
#include "vtkSMStringListDomain.h"
class VTKPVSERVERMANAGERRENDERING_EXPORT vtkSMRendererDomain : public vtkSMStringListDomain
{
public:
static vtkSMRendererDomain* New();
vtkTypeMacro(vtkSMRendererDomain, vtkSMStringListDomain);
void PrintSelf(ostream& os, vtkIndent indent) override;
virtual void Update(vtkSMProperty*) override;
protected:
vtkSMRendererDomain(){};
~vtkSMRendererDomain() override{};
virtual int ReadXMLAttributes(vtkSMProperty* prop, vtkPVXMLElement* element) override;
private:
vtkSMRendererDomain(const vtkSMRendererDomain&) = delete;
void operator=(const vtkSMRendererDomain&) = delete;
};
#endif
......@@ -2612,11 +2612,8 @@
label="Back End"
default_values="scivis"
number_of_elements="1">
<StringListDomain name="list">
<String value="OSPRay raycaster" />
<String value="OSPRay pathtracer" />
<String value="OptiX pathtracer" />
</StringListDomain>
<RendererDomain name="list">
</RendererDomain>
<Documentation>Set the OSPRay renderer to use.</Documentation>
<Hints>
<PropertyWidgetDecorator type="OSPRayHidingDecorator" />
......
Supports Markdown
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