From Ewe Woesnner, "the Inventor loader crashes when a texture could not be loaded.

Please find attached a small fix which solves this issue."
This commit is contained in:
Robert Osfield 2009-01-06 16:35:38 +00:00
parent ec457e34c3
commit dee703a6f3

View File

@ -570,10 +570,12 @@ ConvertFromInventor::getStateSet(SoCallbackAction* action)
stateSet->setTextureAttributeAndModes(0, texture.get(), osg::StateAttribute::ON);
// propogate name
if(texture.valid())
{
std::string name = texture->getName();
if (name != "")
stateSet->setName(name);
}
// Set the texture environment
osg::ref_ptr<osg::TexEnv> texEnv = new osg::TexEnv;
switch (action->getTextureModel())