Commit 047092de authored by Carson Brownlee's avatar Carson Brownlee
Browse files

adding isosurface material

parent 3a187c7e
Pipeline #171351 failed with stage
......@@ -343,10 +343,6 @@ OSPGeometricModel RenderAsCylinders(std::vector<osp::vec3f>& vertices,
ospCommit(_PointColors);
ospSetObject(ospGeoModel, "color", _PointColors);
}
OSPData _mdata = ospNewCopyData1D(mdata.size(), OSP_VEC3F, mdata.data());
ospCommit(_mdata);
ospSetObject(ospMesh, "vertex.position", _mdata);
ospRelease(_mdata);
}
else
{
......
......@@ -21,6 +21,7 @@
#include "vtkImageData.h"
#include "vtkInformation.h"
#include "vtkOSPRayCache.h"
#include "vtkOSPRayMaterialHelpers.h"
#include "vtkOSPRayRendererNode.h"
#include "vtkObjectFactory.h"
#include "vtkPiecewiseFunction.h"
......@@ -322,6 +323,10 @@ void vtkOSPRayVolumeMapperNode::Render(bool prepass)
ospCommit(instance);
ospRelease(group);
this->OSPRayGeometricModel = ospNewGeometricModel(this->OSPRayIsosurface);
OSPMaterial material =
vtkOSPRayMaterialHelpers::NewMaterial(orn, orn->GetORenderer(), "obj");
ospCommit(material);
ospSetObjectAsData(this->OSPRayGeometricModel, "material", OSP_MATERIAL, material);
ospCommit(this->OSPRayGeometricModel);
ospRelease(this->OSPRayIsosurface);
OSPData instanceData =
......
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