Implemented scheme for making sure nested widgest overdraw parent widgets graphics

This commit is contained in:
Robert Osfield
2014-05-23 15:00:49 +00:00
parent 55c2041d4d
commit cca18e82e8
6 changed files with 30 additions and 14 deletions

View File

@@ -13,6 +13,7 @@
#include <osgUI/Style>
#include <osg/Geode>
#include <osg/Depth>
#include <osgText/Text>
using namespace osgUI;
@@ -89,3 +90,9 @@ osg::Node* Style::createIcon(const osg::BoundingBox& extents, const std::string&
return 0;
}
void Style::setupDialogStateSet(osg::StateSet* stateset)
{
stateset->setRenderBinDetails(5, "TraversalOrderBin", osg::StateSet::OVERRIDE_RENDERBIN_DETAILS);
stateset->setAttributeAndModes( new osg::Depth(osg::Depth::LESS,0.0, 1.0,false), osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE );
stateset->setMode( GL_LIGHTING, osg::StateAttribute::OFF );
}