NifLoader: assign a name to created textures

This name will tell the shader visitor how to handle that texture.
move
scrawl 9 years ago
parent 50e92c8136
commit 4cd4131da9

@ -1316,6 +1316,27 @@ namespace NifOsg
stateset->setTextureAttributeAndModes(texUnit, texEnv, osg::StateAttribute::ON);
}
switch (i)
{
case Nif::NiTexturingProperty::BaseTexture:
texture2d->setName("diffuseMap");
break;
case Nif::NiTexturingProperty::BumpTexture:
texture2d->setName("normalMap");
break;
case Nif::NiTexturingProperty::GlowTexture:
texture2d->setName("emissiveMap");
break;
case Nif::NiTexturingProperty::DarkTexture:
texture2d->setName("darkMap");
break;
case Nif::NiTexturingProperty::DetailTexture:
texture2d->setName("detailMap");
break;
default:
break;
}
boundTextures.push_back(tex.uvSet);
}
}

Loading…
Cancel
Save