Commit d848400a authored by Carson Brownlee's avatar Carson Brownlee Committed by Carson Brownlee
Browse files

removing ospRelease conditionals

parent e3a95d36
......@@ -51,7 +51,7 @@ vtkOSPRayLightNode::~vtkOSPRayLightNode()
if (orn)
{
RTW::Backend* backend = orn->GetBackend();
if (backend != nullptr && this->OLight)
if (backend != nullptr)
ospRelease((OSPLight)this->OLight);
}
}
......@@ -153,8 +153,6 @@ void vtkOSPRayLightNode::Render(bool prepass)
RTW::Backend* backend = orn->GetBackend();
if (backend == nullptr)
return;
// if (this->OLight);
// ospRelease(this->OLight);
OSPLight ospLight;
vtkLight* light = vtkLight::SafeDownCast(this->GetRenderable());
......
......@@ -451,18 +451,12 @@ vtkOSPRayRendererNode::~vtkOSPRayRendererNode()
if (this->Internal->Backend != nullptr)
{
RTW::Backend* backend = this->Internal->Backend;
if (this->ODummyInstanceData)
ospRelease(this->ODummyInstanceData);
if (this->OWorld)
ospRelease(this->OWorld);
if (this->ORenderer)
ospRelease(this->ORenderer);
if (this->OFrameBuffer)
ospRelease(this->OFrameBuffer);
if (this->OLightArray)
ospRelease(this->OLightArray);
if (this->OCamera)
ospRelease(this->OCamera);
ospRelease(this->ODummyInstanceData);
ospRelease(this->OWorld);
ospRelease(this->ORenderer);
ospRelease(this->OFrameBuffer);
ospRelease(this->OLightArray);
ospRelease(this->OCamera);
}
this->AccumulateMatrix->Delete();
delete this->Internal;
......@@ -1280,8 +1274,7 @@ void vtkOSPRayRendererNode::Render(bool prepass)
this->ImageX = this->Size[0];
this->ImageY = this->Size[1];
const size_t size = this->ImageX * this->ImageY;
if (this->OFrameBuffer)
ospRelease(this->OFrameBuffer);
ospRelease(this->OFrameBuffer);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wextra"
this->OFrameBuffer = ospNewFrameBuffer(isize,
......@@ -1521,11 +1514,8 @@ void vtkOSPRayRendererNode::Render(bool prepass)
#pragma GCC diagnostic pop
// release data used to store instances and clear world
if (this->OInstanceData)
{
ospRelease(this->OInstanceData);
this->OInstanceData = nullptr;
}
ospRelease(this->OInstanceData);
this->OInstanceData = nullptr;
ospRelease(this->OWorld);
this->OWorld = nullptr;
......
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