Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenWalnut Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
f4f5a50d
Commit
f4f5a50d
authored
Oct 08, 2010
by
schurade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] back to ghetto transparency for now
parent
3fd81c0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
src/modules/marchingCubes/WMMarchingCubes.cpp
src/modules/marchingCubes/WMMarchingCubes.cpp
+15
-15
No files found.
src/modules/marchingCubes/WMMarchingCubes.cpp
View file @
f4f5a50d
...
...
@@ -427,21 +427,21 @@ void WMMarchingCubes::renderMesh()
if
(
m_shaderUseTransparency
)
{
state
->
setMode
(
GL_BLEND
,
osg
::
StateAttribute
::
OVERRIDE
|
osg
::
StateAttribute
::
ON
);
state
->
setRenderingHint
(
osg
::
StateSet
::
TRANSPARENT_BIN
);
// Enable depth test so that an opaque polygon will occlude a transparent one behind it.
state
->
setMode
(
GL_DEPTH_TEST
,
osg
::
StateAttribute
::
OVERRIDE
|
osg
::
StateAttribute
::
ON
);
// Conversely, disable writing to depth buffer so that
// a transparent polygon will allow polygons behind it to shine thru.
// OSG renders transparent polygons after opaque ones.
osg
::
Depth
*
depth
=
new
osg
::
Depth
;
depth
->
setWriteMask
(
false
);
state
->
setAttributeAndModes
(
depth
,
osg
::
StateAttribute
::
OVERRIDE
|
osg
::
StateAttribute
::
ON
);
// Disable conflicting modes.
state
->
setMode
(
GL_LIGHTING
,
osg
::
StateAttribute
::
OVERRIDE
|
osg
::
StateAttribute
::
OFF
);
state
->
setMode
(
GL_CULL_FACE
,
osg
::
StateAttribute
::
OFF
);
//
state->setRenderingHint( osg::StateSet::TRANSPARENT_BIN );
//
//
// Enable depth test so that an opaque polygon will occlude a transparent one behind it.
//
state->setMode( GL_DEPTH_TEST, osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON );
//
//
// Conversely, disable writing to depth buffer so that
//
// a transparent polygon will allow polygons behind it to shine thru.
//
// OSG renders transparent polygons after opaque ones.
//
osg::Depth* depth = new osg::Depth;
//
depth->setWriteMask( false );
//
state->setAttributeAndModes( depth, osg::StateAttribute::OVERRIDE | osg::StateAttribute::ON );
//
//
// Disable conflicting modes.
//
state->setMode( GL_LIGHTING, osg::StateAttribute::OVERRIDE | osg::StateAttribute::OFF );
//
state->setMode( GL_CULL_FACE, osg::StateAttribute::OFF );
}
surfaceGeometry
->
setUseDisplayList
(
false
);
...
...
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