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:
parent
ec457e34c3
commit
dee703a6f3
@ -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())
|
||||
|
Loading…
Reference in New Issue
Block a user