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
Michael Migliore
VTK
Commits
f7edf675
Commit
f7edf675
authored
Sep 06, 2016
by
Carson Brownlee
Committed by
David DeMarle
Sep 07, 2016
Browse files
adding ospray init env arg
parent
95909765
Changes
1
Hide whitespace changes
Inline
Side-by-side
Rendering/OSPRay/vtkOSPRayPass.cxx
View file @
f7edf675
...
...
@@ -31,6 +31,7 @@
#include
"ospray/ospray.h"
#include
<sstream>
#include
<stdexcept>
class
vtkOSPRayPassInternals
:
public
vtkRenderPass
...
...
@@ -67,15 +68,45 @@ vtkOSPRayPass::vtkOSPRayPass()
this
->
SceneGraph
=
NULL
;
int
ac
=
1
;
const
char
*
av
[]
=
{
"pvOSPRay
\0
"
}
;
try
const
char
*
envArgs
=
getenv
(
"VTKOSPRAY_ARGS"
)
;
if
(
envArgs
)
{
ospInit
(
&
ac
,
av
);
std
::
stringstream
ss
(
envArgs
);
std
::
string
arg
;
std
::
vector
<
std
::
string
>
args
;
while
(
ss
>>
arg
)
{
args
.
push_back
(
arg
);
}
int
ac
=
args
.
size
()
+
1
;
char
*
av
[
ac
];
av
[
0
]
=
new
char
[
512
];
strcpy
(
av
[
0
],
"pvOSPRay
\0
"
);
for
(
int
i
=
1
;
i
<
ac
;
i
++
)
{
av
[
i
]
=
new
char
[
args
[
i
-
1
].
size
()
+
1
];
strcpy
(
av
[
i
],
args
[
i
-
1
].
c_str
());
}
try
{
ospInit
(
&
ac
,
(
const
char
**
)
av
);
}
catch
(
std
::
runtime_error
&
vtkNotUsed
(
e
))
{
//todo: request addition of ospFinalize() to ospray
}
}
catch
(
std
::
runtime_error
&
vtkNotUsed
(
e
))
else
{
//todo: request addition of ospFinalize() to ospray
//cerr << "warning: double init" << endl;
const
char
*
av
[]
=
{
"pvOSPRay
\0
"
};
try
{
ospInit
(
&
ac
,
av
);
}
catch
(
std
::
runtime_error
&
vtkNotUsed
(
e
))
{
//todo: request addition of ospFinalize() to ospray
}
}
vtkOSPRayViewNodeFactory
*
vnf
=
vtkOSPRayViewNodeFactory
::
New
();
...
...
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