NifLoader: create the BumpTexture slot, but don't use it yet

pull/903/head
scrawl 9 years ago
parent 4cd4131da9
commit 606758d72f

@ -1230,6 +1230,7 @@ namespace NifOsg
case Nif::NiTexturingProperty::BaseTexture:
case Nif::NiTexturingProperty::GlowTexture:
case Nif::NiTexturingProperty::DarkTexture:
case Nif::NiTexturingProperty::BumpTexture:
case Nif::NiTexturingProperty::DetailTexture:
break;
case Nif::NiTexturingProperty::GlossTexture:
@ -1237,11 +1238,6 @@ namespace NifOsg
std::cerr << "NiTexturingProperty::GlossTexture in " << mFilename << " not currently used." << std::endl;
continue;
}
case Nif::NiTexturingProperty::BumpTexture:
{
std::cerr << "NiTexturingProperty::BumpTexture in " << mFilename << " not currently used." << std::endl;
continue;
}
case Nif::NiTexturingProperty::DecalTexture:
{
std::cerr << "NiTexturingProperty::DecalTexture in " << mFilename << " not currently used." << std::endl;
@ -1315,6 +1311,11 @@ namespace NifOsg
texEnv->setSource1_RGB(GL_TEXTURE);
stateset->setTextureAttributeAndModes(texUnit, texEnv, osg::StateAttribute::ON);
}
else if (i == Nif::NiTexturingProperty::BumpTexture)
{
// Set this texture to Off by default since we can't render it with the fixed-function pipeline
stateset->setTextureMode(texUnit, GL_TEXTURE_2D, osg::StateAttribute::OFF);
}
switch (i)
{

Loading…
Cancel
Save