Implemented clipping of widget to the widgets extents.

This commit is contained in:
Robert Osfield
2014-05-23 18:59:16 +00:00
parent cca18e82e8
commit f50ec0fe8e
7 changed files with 78 additions and 49 deletions

View File

@@ -76,9 +76,7 @@ void Popup::leaveImplementation()
void Popup::createGraphicsImplementation()
{
OSG_NOTICE<<"Popup::createGraphicsImplementation()"<<std::endl;
_transform = new osg::PositionAttitudeTransform;
_transform = new osg::PositionAttitudeTransform;
Style* style = (getStyle()!=0) ? getStyle() : Style::instance().get();
@@ -87,6 +85,7 @@ void Popup::createGraphicsImplementation()
_transform->addChild( style->createPanel(_extents, dialogBackgroundColor) );
style->setupDialogStateSet(getOrCreateStateSet());
style->setupClipStateSet(_extents, getOrCreateStateSet());
setGraphicsSubgraph(_transform.get());
}