"I found some artifacts on some models and traced it back to the
external palette override feature. There are some changes in the
layout of the external record the loader have to take into
consideration.
The other fix is to remove the OF pools from the user data of the
external ProxyNode when it is no longer needed."
_TYPES_H_. types.h in the directx plugin defines the same include
guard. I've renamed the guard name in this file to _DX_TYPES_H_. Now
the plugin compile in mingw too."
"Previously, the new OpenFlight plugin only allowed ext ref models to use
their own palettes. With this change, parent models can override child model
palettes with the parent palettes.
These changes are made against very current CVS (just updated about 1/2 hour
ago, eliminated conflicts, and retested before this posting).
To regurgitate what I did:
A new class, ParentPools (public osg::Referenced), is created when an ext
ref record is parsed, and it is populated with any parent model pools that
should override the child model pools (according to bits in the ext ref
record). The ParentPools object is then set as UserData on the ProxyNode
corresponding to the ext ref.
When the ReadExternalsVisitor hits the ProxyNode, it takes its UserData and
sets it as UserData in the Options parameter to the osgDB::ReadNode call,
which then read the ext ref model. In the course of parsing the Options
string, ReaderWriterFLT also looks at the Options UserData and sets the
parent pools in the Document class accordingly.
When palette records are encountered while loading a file, they are ignored
if the corresponding pool was set by the parent.
Thanks to Brede for consulting with me on the implementation.
"
through the osgDB::readImageFile and osgDB::writeImageFile functions.
This is useful for storing compressed textures on disk for rapid playback
for animations."
From Robert Osfield, remapped Paul Martz's changes to Pools.h and PaletteRecords.cpp w.r.t texturePatternIndex being a in16, and converted a char* string to a std::string.
email comments from Andew Sampson,
"I've contacted Terrex, and obtained the 2.2 version
of their trpage library. The library included a
fork of OSG 0.9.8's txp plugin, modified to load 2.1+
txp DBs.
I've done the work of incorporating the changes made
to OSG's txp plugin since 0.9.8 into Terrex's fork.
The forked version is now up-to-date with the changes
made to OSG 0.9.9 and 1.0.
Terrex made a lot of changes (especially differences
in whitespace), so the diff between the forked version
and OSG 1.0's txp plugin is yucky. I did my best, but
keep in mind that this is the result of a 4-way merge
(kinda... terrex-0.9.8, stock-0.9.8, stock-0.9.9,
stock-1.0).
I really want to see this forked version merged back
into the main OSG branch. The new features offered by
this version of the plugin (2.1+ support, variable
LOD support, bug fixes) are worth the trouble."
--
Don Tidrow then took this code and added his work.
--
Robert Osfield then fixed all the warnings that abound in the trpage code base.
There are some group codes (i.e. "62") which are interpreted as
dxfDataType::SHORT. That's right because the dxf-specification defines
"16 bit integer" as the type for the corresponding value.
But readerBase::readGroup() calls readValue(std::ifstream&, unsigned
short). I changed readValue(std::ifstream&, unsigned short) to
readValue(std::ifstream&, short). I found no group code at the dxf-specs
which needs a "16 bit unsigned integer" value. So the
readValue(std::ifstream&, unsigned short) function is obsolete - right?
changes to this plugin that aren't in current CVS yet -- this change is
based on current CVS, not our changed files.)
This changes how shader palette records are parsed to support GLSL per the
OpenFlight 16.1 spec. Existing functionality for 16.0 files is preserved.
The change to Document.h simply adds an enum for VERSION_16_1."