Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
6925c70a
Commit
6925c70a
authored
Jan 28, 2010
by
Alexander Wiebel
Browse files
[STYLE]
parent
5e605809
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
src/dataHandler/WDataTexture3D.cpp
src/dataHandler/WDataTexture3D.cpp
+2
-3
No files found.
src/dataHandler/WDataTexture3D.cpp
View file @
6925c70a
...
...
@@ -204,27 +204,26 @@ void WDataTexture3D::createTexture()
if
(
m_valueSet
->
getDataType
()
==
W_DT_UINT8
)
{
std
::
cout
<<
"W_DT_UINT8"
<<
std
::
endl
;
boost
::
shared_ptr
<
WValueSet
<
unsigned
char
>
>
vs
=
boost
::
shared_dynamic_cast
<
WValueSet
<
unsigned
char
>
>
(
m_valueSet
);
unsigned
char
*
source
=
const_cast
<
unsigned
char
*
>
(
vs
->
rawData
()
);
ima
=
createTexture3D
(
source
,
m_valueSet
->
dimension
()
);
}
else
if
(
m_valueSet
->
getDataType
()
==
W_DT_INT16
)
{
std
::
cout
<<
"W_DT_INT16"
<<
std
::
endl
;
boost
::
shared_ptr
<
WValueSet
<
int16_t
>
>
vs
=
boost
::
shared_dynamic_cast
<
WValueSet
<
int16_t
>
>
(
m_valueSet
);
int16_t
*
source
=
const_cast
<
int16_t
*
>
(
vs
->
rawData
()
);
ima
=
createTexture3D
(
source
,
m_valueSet
->
dimension
()
);
}
else
if
(
m_valueSet
->
getDataType
()
==
W_DT_FLOAT
)
{
std
::
cout
<<
"W_DT_FLOAT"
<<
std
::
endl
;
boost
::
shared_ptr
<
WValueSet
<
float
>
>
vs
=
boost
::
shared_dynamic_cast
<
WValueSet
<
float
>
>
(
m_valueSet
);
float
*
source
=
const_cast
<
float
*
>
(
vs
->
rawData
()
);
ima
=
createTexture3D
(
source
,
m_valueSet
->
dimension
()
);
}
else
{
wlog
::
error
(
"WDataTexture3D"
)
<<
"COnversion of this data type to texture not supported yet."
;
}
m_texture
=
osg
::
ref_ptr
<
osg
::
Texture3D
>
(
new
osg
::
Texture3D
);
m_texture
->
setFilter
(
osg
::
Texture3D
::
MIN_FILTER
,
osg
::
Texture3D
::
LINEAR
);
...
...
Write
Preview
Markdown
is supported
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