Introduced osgViewer::Config base class and beginnigs of various Config implementations.

Introduced osgViewer serializers plugin for serialization support for osgViewer::Config implementations and Keystone
This commit is contained in:
Robert Osfield
2013-05-15 11:31:49 +00:00
parent 07499f6658
commit bcbaaefa02
10 changed files with 2755 additions and 25 deletions

View File

@@ -592,28 +592,3 @@ bool Keystone::loadKeystoneFiles(osg::DisplaySettings* ds)
return keystonesLoaded;
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Serialization support
//
#include <osgDB/ObjectWrapper>
#include <osgDB/InputStream>
#include <osgDB/OutputStream>
REGISTER_OBJECT_WRAPPER( Keystone,
new osgViewer::Keystone,
osgViewer::Keystone,
"osg::Object osgViewer::Keystone" )
{
ADD_BOOL_SERIALIZER( KeystoneEditingEnabled, true );
ADD_VEC4_SERIALIZER( GridColor, osg::Vec4(1.0,1.0,1.0,1.0) );
ADD_VEC2D_SERIALIZER( BottomLeft, osg::Vec2d(0.0,0.0) );
ADD_VEC2D_SERIALIZER( BottomRight, osg::Vec2d(0.0,0.0) );
ADD_VEC2D_SERIALIZER( TopLeft, osg::Vec2d(0.0,0.0) );
ADD_VEC2D_SERIALIZER( TopRight, osg::Vec2d(0.0,0.0) );
}