Hi Rui,

On 23 February 2012 04:01, Wang Rui <[email protected]> wrote:
> I've reviewed the submissions and think it OK for reading and writing files
> of different endians currently. It should be appropriate to merge it into
> the trunk version.

Thanks for review it.  I'm not yet happy to merge the submission as is
as I'd like to properly resolve the issue of endian rather
flip-flopping between partial implementations.

> For a specific endian flag, I've read the implementation in IVE and OSGB and
> think it might be necessary to have an opposite magic number like
> OSG_HEADER_LOW_OPPOSITE, so that we can determine the endian type at the
> beginning of file. The attribute flags are recorded after the magic numbers
> and the version are written, which makes trouble to the determination of the
> magic number and version values if we choose to save the endian type in the
> attribute field.

I think this is probably a useful first step, though we'll need to
check the version as well as older binary files won't have the new
endian.  Perhaps we should introduce wholly new OSG_HEADER_LOW low
values to explictly label the new support for endian and of course the
OSG_HEADER_LOW_OPPOSITE would be a byte reversal of this.

My inclination is as a first step sort this out, then start
integrating Colin's changes adapting them to optionally do the endian
swap on write out, or perhaps we can avoid the endian swap on write
out completely if we are explictly labelling the endian.

Robert.
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to