From Don Tidrow, "I added some code to assign the archive pointer in TXPnode

with the archive that ReaderWriterTXP actually loads.  I also added a
function in TXPArchive to help in manipulating the lightpoints."
This commit is contained in:
Robert Osfield
2005-05-11 19:34:03 +00:00
parent 679c44f4ae
commit bdc7e8b4a9
3 changed files with 11 additions and 7 deletions

View File

@@ -44,7 +44,7 @@ osgDB::ReaderWriter::ReadResult ReaderWriterTXP::local_readNode(const std::strin
{
int id = _archiveId++;
archive->setId(id);
getArchive(id,osgDB::getFilePath(fileName));
txpNode->setArchive(getArchive(id,osgDB::getFilePath(fileName)));
}
return txpNode.get();
}
@@ -217,11 +217,11 @@ TXPArchive *ReaderWriterTXP::getArchive(int id, const std::string& dir)
return NULL;
}
if (archive->loadTextStyles() == false)
{
ReaderWriterTXPERROR("getArchive()") << "failed to load text styles from archive: \"" << archiveName << "\"" << std::endl;
return NULL;
}
if (archive->loadTextStyles() == false)
{
ReaderWriterTXPERROR("getArchive()") << "failed to load text styles from archive: \"" << archiveName << "\"" << std::endl;
return NULL;
}
archive->setId(id);