From Jason Daly, "We have a few OpenFlight files that used to display properly with the

old loader, but appear very, very wrong with the new one.  I traced the
problem to the handling of the palette override flags in the external
reference records.  The current behavior for handling the palette
override flags for external references has different offsets for
different OpenFlight version (2 bytes for 14.2-15.1 and 4 bytes for 15.2
and later).  However, I believe this behavior is incorrect.

I know that the original 14.2 OpenFlight spec (dated April 1995)
specifies 2 bytes between the filename and the override flags, and the
15.4 and later specs specify 4 bytes.  However, I also found a 14.2.4
OpenFlight spec (dated January 1996) that changes the specification to 4
bytes.  Also, the databases in question were created using an old IRIX
version of MultiGen II, which wrote OpenFlight 14.2 files natively.
These files also have 4 bytes between the filename and flags.
Furthermore, these databases have always worked properly under earlier
versions of OSG, under Performer, and in every MultiGen product we've used.

This leads me to believe that the original 14.2 spec was incorrect (the
14.2.4 spec corrected this error), and there should be 4 bytes between
the filename and flags for all OpenFlight files version 14.2 and later.

The attached fix modifies the OpenFlight loader to behave in this way."
This commit is contained in:
Robert Osfield 2007-06-08 10:58:22 +00:00
parent c28aba4d4f
commit b4cd96ebdd

View File

@ -658,10 +658,7 @@ protected:
// Set parent pools as user data
if (document.version() >= VERSION_14_2)
{
in.forward(2);
if (document.version() >= VERSION_15_1)
in.forward(2);
in.forward(4);
uint32 mask = in.readUInt32(~0);