Hi JS, On Thu, Dec 10, 2009 at 5:11 PM, Jean-Sébastien Guay <[email protected]> wrote: >> I believe .osg would be the most appropriate extension, the header >> could declare which version of the format it is - whether it's binary, >> new ascii or old ascii. We could possible have a .osgb for binary. > > Stupid question, but if .osg is used for both binary and ascii how would we > specify which one we want in this line of code: > > osgDB::writeNodeFile(*scene, "saved_scene.osg"); > > ?
Not a stupid question at all... It hadn't even occurred to me :-) > Would we need to add an option? I don't see how this line of code in user > apps could work with this new plugin that would use the same extension for > both binary and ascii, unless ascii is the default or something... We could certainly need to use an osgDB::Option to tell the plugin which version to write, including whether the old writing the old version .osg is required. One could possible add a convenience function like writeBinaryNodeFile() to that automatically set the hint in osgDB::Options to binary. Or... just have the binary format extension be .osgb... :-) Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

