Added osgUI::Widget::set/getGraphicsSubgraph() to hold the subgraph that does the rendering portion of widgets
This commit is contained in:
@@ -215,9 +215,13 @@ void Widget::traverseImplementation(osg::NodeVisitor& nv)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
osg::Group::traverse(nv);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_graphicsSubgraph.valid()) _graphicsSubgraph->accept(nv);
|
||||
|
||||
osg::Group::traverse(nv);
|
||||
}
|
||||
}
|
||||
@@ -285,3 +289,16 @@ osg::BoundingSphere Widget::computeBound() const
|
||||
if (_extents.valid()) return osg::BoundingSphere(_extents);
|
||||
else return osg::Group::computeBound();
|
||||
}
|
||||
|
||||
void Widget::resizeGLObjectBuffers(unsigned int maxSize)
|
||||
{
|
||||
if (_graphicsSubgraph.valid()) _graphicsSubgraph->resizeGLObjectBuffers(maxSize);
|
||||
Group::resizeGLObjectBuffers(maxSize);
|
||||
}
|
||||
|
||||
|
||||
void Widget::releaseGLObjects(osg::State* state) const
|
||||
{
|
||||
if (_graphicsSubgraph.valid()) _graphicsSubgraph->releaseGLObjects(state);
|
||||
Group::releaseGLObjects(state);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user