Hi Robert and Collada submitters/users, Warning: This submission implies my previous one has been integrated (See "[osg-submissions] DAE Reading fix for path containing '#'"). Base rev: trunk 12208
Commit message: - Made Collada reader not create StateSets with an empty texture unit BEFORE a valid one (Ex: Texture unit 0 empty, texture unit 1 containing diffuse). Actually previous implementation is valid and may work for many usages, but unfortunately some writers only support texture unit "0" and thus will skip textures of simple models made with only a diffuse texture. - I also spotted ReaderWriterDAE::readNode() was missing a "if (bOwnDAE) delete pDAE;" near line 71 (before "return ReadResult::ERROR_IN_READING_FILE;") and thus may lead to a memory leak. In order to avoid only handling this case, I added a RAII structure to deallocate "pDAE". I know it's a bit a burden having such code, but as ColladaDom is C++ (contrary to 3DS which is C) and may throw exceptions, I think this is cleaner. Collada submitters/users, please test files containing AMBIENT_OCCLUSION_UNIT if possible, since I don't have any model to test. Changes are quite straightforward but this should be tested anyway. Cheers, Sukender PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
dae 2011-03-08 Non-empty texture units.7z
Description: application/7z-compressed
_______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
