Oops, forgot to mention... You can store configuration information in a custom
osg::Object. In essence, you would do the same thing with your config data as
OSG does with its internal Objects (such as osg::Image, as one example).
To do this, you would need to declare the custom Object class with member
variable to store the config data. Then write the necessary code to serialize
the class and its data. At runtime, you would use
osgDB::writeObjectFile()/readObjectFile() to store/load an instance of your
custom Object. This technique lets you store and retrieve the Object from
.osg/.osgt/.osgb.
I've done this with .osg in the past, but the .osgt/.osgb format is the new way
to go. Unfortunately, I'm not familiar with how to write the serialization code
for those formats. A little digging into the source should provide you with some
direction.
-Paul
On 7/1/2012 12:03 PM, Paul Martz wrote:
OSG is a 3D graphics scene graph SDK. While a significant amount of non-graphics
functionality has crept in over the years, OSG is still not, and probably
shouldn't be, a general-purpose application SDK. For this reason, the config
file and .ini support you are looking for is not present in OSG.
This leaves you with the choice to either add a dependency on another SDK that
includes the functionality you need, or code that functionality yourself. This
is a decision that all app developers will need to make.
-Paul
On 6/30/2012 9:55 PM, michael kapelko wrote:
Well, my intention is not bring any additional dependency apart from
OSG alone. Speaking of better formats, does OSG has any config file
reader? Or it's intentionally left for application to implement?
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org