Re: [osg-users] Does OSG have INI config file reader?
Well there's osgDB::XmlParser if you can live with xml. http://www.openscenegraph.org/projects/osg/browser/OpenSceneGraph/trunk/include/osgDB/XmlParser On 1 July 2012 04:55, michael kapelko korn...@gmail.com 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 -- http://www.ssTk.co.uk ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Does OSG have INI config file reader?
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
Re: [osg-users] Does OSG have INI config file reader?
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
Re: [osg-users] Does OSG have INI config file reader?
Poco has a .ini reader: pocoproject.org. -Paul On 6/30/2012 4:47 AM, michael kapelko wrote: Hi. I failed to google any info up. Does anyone know? Thanks. ___ 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
Re: [osg-users] Does OSG have INI config file reader?
Well, I don't want to use POCO just for reading INI. I wonder if OSG has one. If not, I'll have to write one myself, it's not that hard, but would be good if OSG has one already. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Does OSG have INI config file reader?
You could use Boost.PropertyTree http://www.boost.org/doc/libs/1_50_0/doc/html/boost_propertytree/parsers.html#boost_propertytree.parsers.ini_parser Then you can use ini files or chose a better format. On 30 June 2012 17:18, michael kapelko korn...@gmail.com wrote: Well, I don't want to use POCO just for reading INI. I wonder if OSG has one. If not, I'll have to write one myself, it's not that hard, but would be good if OSG has one already. ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org -- http://www.ssTk.co.uk ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Re: [osg-users] Does OSG have INI config file reader?
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