From Sukender, I wrapped my change about non-empty texture units in an off-by-default option, so that it doesn't break any existing code. But AFAIK, other readers (except OSGx) generate contiguous texture units, so I guess this option to be useful for users.

Other changes in this sumbission include the added ability to tessellate polygons in Collada reader, with appropriate options.
 - No tessellation
 - Tessellate as triangle fan (previous behaviour, kept as default for backward-compatibility)
 - Full tessellation

I also put auto_ptr<> for RAII of DAE structure (as discussed), and moved reader options in a structure, as for the writer.

Code also make use of osgDB::ExternalFileWriter I submitted, so please merge this submission after the PluginImageWriter one.
This commit is contained in:
Robert Osfield
2011-05-16 10:07:20 +00:00
parent b1d3763510
commit c44ef1bfd9
13 changed files with 320 additions and 254 deletions

View File

@@ -184,7 +184,7 @@ void daeWriter::apply( osg::Transform &node )
// If a DOFTransform node store it's data as extra "DOFTransform" data in the "OpenSceneGraph" technique
osgSim::DOFTransform* dof = dynamic_cast<osgSim::DOFTransform*>(&node);
if (writeExtras && dof)
if (_pluginOptions.writeExtras && dof)
{
// Adds the following to a node