Replaced Widget::GraphicsSubgraph with GraphicsSubgraphMap to allow finer control of when the rendering subgraphs are done.

This commit is contained in:
Robert Osfield
2014-05-28 10:06:14 +00:00
parent 6af9edf33b
commit 1fcb91900a
13 changed files with 83 additions and 31 deletions

View File

@@ -38,10 +38,6 @@ static bool writeColorMap( osgDB::OutputStream& os, const osg::TransferFunction1
}
#endif
#define ADD_MAP_SERIALIZER(PROP, TYPE, KEYTYPE, ELEMENTTYPE) \
wrapper->addSerializer( new osgDB::MapSerializer< MyClass, TYPE >( \
#PROP, &MyClass::get##PROP, &MyClass::get##PROP, &MyClass::set##PROP, KEYTYPE, ELEMENTTYPE), osgDB::BaseSerializer::RW_MAP )
REGISTER_OBJECT_WRAPPER( TransferFunction1D,
new osg::TransferFunction1D,

View File

@@ -69,7 +69,7 @@ REGISTER_OBJECT_WRAPPER( Widget,
ADD_BOOL_SERIALIZER(HasEventFocus, false);
ADD_OBJECT_SERIALIZER( GraphicsSubgraph, osg::Node, NULL );
ADD_MAP_SERIALIZER(GraphicsSubgraphMap, osgUI::Widget::GraphicsSubgraphMap, osgDB::BaseSerializer::RW_INT, osgDB::BaseSerializer::RW_OBJECT);
ADD_BOUNDINGBOXF_SERIALIZER(Extents, osg::BoundingBoxf());