Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Carson Brownlee
VTK
Commits
d848400a
Commit
d848400a
authored
Apr 10, 2020
by
Carson Brownlee
Committed by
Carson Brownlee
Apr 29, 2020
Browse files
removing ospRelease conditionals
parent
e3a95d36
Changes
2
Hide whitespace changes
Inline
Side-by-side
Rendering/RayTracing/vtkOSPRayLightNode.cxx
View file @
d848400a
...
@@ -51,7 +51,7 @@ vtkOSPRayLightNode::~vtkOSPRayLightNode()
...
@@ -51,7 +51,7 @@ vtkOSPRayLightNode::~vtkOSPRayLightNode()
if
(
orn
)
if
(
orn
)
{
{
RTW
::
Backend
*
backend
=
orn
->
GetBackend
();
RTW
::
Backend
*
backend
=
orn
->
GetBackend
();
if
(
backend
!=
nullptr
&&
this
->
OLight
)
if
(
backend
!=
nullptr
)
ospRelease
((
OSPLight
)
this
->
OLight
);
ospRelease
((
OSPLight
)
this
->
OLight
);
}
}
}
}
...
@@ -153,8 +153,6 @@ void vtkOSPRayLightNode::Render(bool prepass)
...
@@ -153,8 +153,6 @@ void vtkOSPRayLightNode::Render(bool prepass)
RTW
::
Backend
*
backend
=
orn
->
GetBackend
();
RTW
::
Backend
*
backend
=
orn
->
GetBackend
();
if
(
backend
==
nullptr
)
if
(
backend
==
nullptr
)
return
;
return
;
// if (this->OLight);
// ospRelease(this->OLight);
OSPLight
ospLight
;
OSPLight
ospLight
;
vtkLight
*
light
=
vtkLight
::
SafeDownCast
(
this
->
GetRenderable
());
vtkLight
*
light
=
vtkLight
::
SafeDownCast
(
this
->
GetRenderable
());
...
...
Rendering/RayTracing/vtkOSPRayRendererNode.cxx
View file @
d848400a
...
@@ -451,18 +451,12 @@ vtkOSPRayRendererNode::~vtkOSPRayRendererNode()
...
@@ -451,18 +451,12 @@ vtkOSPRayRendererNode::~vtkOSPRayRendererNode()
if
(
this
->
Internal
->
Backend
!=
nullptr
)
if
(
this
->
Internal
->
Backend
!=
nullptr
)
{
{
RTW
::
Backend
*
backend
=
this
->
Internal
->
Backend
;
RTW
::
Backend
*
backend
=
this
->
Internal
->
Backend
;
if
(
this
->
ODummyInstanceData
)
ospRelease
(
this
->
ODummyInstanceData
);
ospRelease
(
this
->
ODummyInstanceData
);
ospRelease
(
this
->
OWorld
);
if
(
this
->
OWorld
)
ospRelease
(
this
->
ORenderer
);
ospRelease
(
this
->
OWorld
);
ospRelease
(
this
->
OFrameBuffer
);
if
(
this
->
ORenderer
)
ospRelease
(
this
->
OLightArray
);
ospRelease
(
this
->
ORenderer
);
ospRelease
(
this
->
OCamera
);
if
(
this
->
OFrameBuffer
)
ospRelease
(
this
->
OFrameBuffer
);
if
(
this
->
OLightArray
)
ospRelease
(
this
->
OLightArray
);
if
(
this
->
OCamera
)
ospRelease
(
this
->
OCamera
);
}
}
this
->
AccumulateMatrix
->
Delete
();
this
->
AccumulateMatrix
->
Delete
();
delete
this
->
Internal
;
delete
this
->
Internal
;
...
@@ -1280,8 +1274,7 @@ void vtkOSPRayRendererNode::Render(bool prepass)
...
@@ -1280,8 +1274,7 @@ void vtkOSPRayRendererNode::Render(bool prepass)
this
->
ImageX
=
this
->
Size
[
0
];
this
->
ImageX
=
this
->
Size
[
0
];
this
->
ImageY
=
this
->
Size
[
1
];
this
->
ImageY
=
this
->
Size
[
1
];
const
size_t
size
=
this
->
ImageX
*
this
->
ImageY
;
const
size_t
size
=
this
->
ImageX
*
this
->
ImageY
;
if
(
this
->
OFrameBuffer
)
ospRelease
(
this
->
OFrameBuffer
);
ospRelease
(
this
->
OFrameBuffer
);
#pragma GCC diagnostic push
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wextra"
#pragma GCC diagnostic ignored "-Wextra"
this
->
OFrameBuffer
=
ospNewFrameBuffer
(
isize
,
this
->
OFrameBuffer
=
ospNewFrameBuffer
(
isize
,
...
@@ -1521,11 +1514,8 @@ void vtkOSPRayRendererNode::Render(bool prepass)
...
@@ -1521,11 +1514,8 @@ void vtkOSPRayRendererNode::Render(bool prepass)
#pragma GCC diagnostic pop
#pragma GCC diagnostic pop
// release data used to store instances and clear world
// 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
);
ospRelease
(
this
->
OWorld
);
this
->
OWorld
=
nullptr
;
this
->
OWorld
=
nullptr
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment