diff --git a/examples/osgpresentation/osgpresentation.cpp b/examples/osgpresentation/osgpresentation.cpp index a0531e1cc..adbff4965 100644 --- a/examples/osgpresentation/osgpresentation.cpp +++ b/examples/osgpresentation/osgpresentation.cpp @@ -9,7 +9,13 @@ #include #include +#include +#include +#include +#include + #include +#include #include #include @@ -93,6 +99,22 @@ int main(int argc, char** argv) #endif - viewer.setSceneData( model.get() ); + osg::ref_ptr presentation = new osgPresentation::Presentation; + osg::ref_ptr slide = new osgPresentation::Slide; + osg::ref_ptr layer = new osgPresentation::Layer; + osg::ref_ptr group = new osgPresentation::Group; + osg::ref_ptr element = new osgPresentation::Element; + presentation->addChild(slide.get()); + slide->addChild(layer.get()); + //layer->addChild(element.get()); + layer->addChild(group.get()); + group->addChild(element.get()); + element->addChild(model.get()); + + viewer.setSceneData( presentation.get() ); + + + osgDB::writeNodeFile(*presentation, "pres.osgt"); + return viewer.run(); } diff --git a/src/osgWrappers/serializers/osgPresentation/Element.cpp b/src/osgWrappers/serializers/osgPresentation/Element.cpp index 4b18c49ea..9680029c5 100644 --- a/src/osgWrappers/serializers/osgPresentation/Element.cpp +++ b/src/osgWrappers/serializers/osgPresentation/Element.cpp @@ -3,7 +3,7 @@ #include #include -REGISTER_OBJECT_WRAPPER( Element, +REGISTER_OBJECT_WRAPPER( osgPresentation_Element, new osgPresentation::Element, osgPresentation::Element, "osg::Object osg::Node osg::Group osg::Transform osg::MatrixTransform osgPresentation::Group osgPresentation::Element" ) diff --git a/src/osgWrappers/serializers/osgPresentation/Group.cpp b/src/osgWrappers/serializers/osgPresentation/Group.cpp index 7a6f5beaa..97056f05d 100644 --- a/src/osgWrappers/serializers/osgPresentation/Group.cpp +++ b/src/osgWrappers/serializers/osgPresentation/Group.cpp @@ -3,7 +3,7 @@ #include #include -REGISTER_OBJECT_WRAPPER( Group, +REGISTER_OBJECT_WRAPPER( osgPresentation_Group, new osgPresentation::Group, osgPresentation::Group, "osg::Object osg::Node osg::Group osg::Transform osg::MatrixTransform osgPresentation::Group" ) diff --git a/src/osgWrappers/serializers/osgPresentation/Layer.cpp b/src/osgWrappers/serializers/osgPresentation/Layer.cpp index f02e45bc4..3f308b60a 100644 --- a/src/osgWrappers/serializers/osgPresentation/Layer.cpp +++ b/src/osgWrappers/serializers/osgPresentation/Layer.cpp @@ -3,7 +3,7 @@ #include #include -REGISTER_OBJECT_WRAPPER( Layer, +REGISTER_OBJECT_WRAPPER( osgPresentation_Layer, new osgPresentation::Layer, osgPresentation::Layer, "osg::Object osg::Node osg::Group osg::Transform osg::MatrixTransform osgPresentation::Group osgPresentation::Layer" ) diff --git a/src/osgWrappers/serializers/osgPresentation/Presentation.cpp b/src/osgWrappers/serializers/osgPresentation/Presentation.cpp index 5d330158b..52cfaa5cf 100644 --- a/src/osgWrappers/serializers/osgPresentation/Presentation.cpp +++ b/src/osgWrappers/serializers/osgPresentation/Presentation.cpp @@ -3,7 +3,7 @@ #include #include -REGISTER_OBJECT_WRAPPER( Presentation, +REGISTER_OBJECT_WRAPPER( osgPresentation_Presentation, new osgPresentation::Presentation, osgPresentation::Presentation, "osg::Object osg::Node osg::Group osg::Transform osg::MatrixTransform osgPresentation::Group osgPresentation::Presentation" ) diff --git a/src/osgWrappers/serializers/osgPresentation/Section.cpp b/src/osgWrappers/serializers/osgPresentation/Section.cpp index 8b5d533d3..6597c71d6 100644 --- a/src/osgWrappers/serializers/osgPresentation/Section.cpp +++ b/src/osgWrappers/serializers/osgPresentation/Section.cpp @@ -3,7 +3,7 @@ #include #include -REGISTER_OBJECT_WRAPPER( Section, +REGISTER_OBJECT_WRAPPER( osgPresentation_Section, new osgPresentation::Section, osgPresentation::Section, "osg::Object osg::Node osg::Group osg::Transform osg::MatrixTransform osgPresentation::Group osgPresentation::Section" ) diff --git a/src/osgWrappers/serializers/osgPresentation/Slide.cpp b/src/osgWrappers/serializers/osgPresentation/Slide.cpp index 6dad8b8cb..7aa206c80 100644 --- a/src/osgWrappers/serializers/osgPresentation/Slide.cpp +++ b/src/osgWrappers/serializers/osgPresentation/Slide.cpp @@ -3,7 +3,7 @@ #include #include -REGISTER_OBJECT_WRAPPER( Slide, +REGISTER_OBJECT_WRAPPER( osgPresentation_Slide, new osgPresentation::Slide, osgPresentation::Slide, "osg::Object osg::Node osg::Group osg::Transform osg::MatrixTransform osgPresentation::Group osgPresentation::Slide" )