Hi John,

Thanks for the suggestion. Change the ascii file header to a more
clear one should be necessary. I would like to consider the
modification this time.

But it may not be enough to only test the characters here for backward
compatibility because the binary format won't write such keywords.
Instead the osgb files will have a magic number at the beginning for
differentiation. So for binary files the best way is to make use of
the soversion number, or the attribute flags which is always written
in osgb files (at present it is used only for enabling/disabling
compressors).

Cheers,

Wang Rui


2012/8/29 PCJohn <[email protected]>:
> Hi Rui,
>
>> > When you say at the beginning of each file, what do you mean?
>>
>> I just mean that the version string can be stored in the saved file,
>> too, so it will be used automatically while reading. A boolean flag
>> will be also used to indicate the feature is enabled or disabled for
>> backward-compatibility.
>
> First of all, osgt is great for storing OSG scene graph. Thanks for it.
> Maybe just a stupid comment. When I look to osgt files, I am always thinking
> about the header:
>
> #Ascii Scene
> #Version 90
> #Generator OpenSceneGraph 3.1.0
>
> Would it be possible to follow Unix customs and to make first line identify 
> the
> content of the file? "Ascii Scene" is good, but there are other 3D scene
> formats in ascii (X3D, STL, Inventor,...). "OpenSceneGraph Ascii Scene" would
> be more precise. To get OpenSceneGraph from Generator string is not correct as
> OSG can write to many file formats (and Generator string is not the first line
> :-) ).
>
> Backward compatibility can be implemented by testing for both headers "Ascii
> Scene" and the new one.
>
> Just a small idea.
> John
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to