mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-24 08:41:37 +00:00
And one more
This commit is contained in:
parent
9ce26ef4b6
commit
02cafc3b98
1 changed files with 2 additions and 5 deletions
|
@ -292,12 +292,9 @@ namespace Shader
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* defaultTextures[] = { "diffuseMap", "normalMap", "emissiveMap", "darkMap", "detailMap", "envMap", "specularMap", "decalMap", "bumpMap", "glossMap" };
|
const char* defaultTextures[] = { "diffuseMap", "normalMap", "emissiveMap", "darkMap", "detailMap", "envMap", "specularMap", "decalMap", "bumpMap", "glossMap" };
|
||||||
bool isTextureNameRecognized(const std::string& name)
|
bool isTextureNameRecognized(std::string_view name)
|
||||||
{
|
{
|
||||||
for (unsigned int i=0; i<sizeof(defaultTextures)/sizeof(defaultTextures[0]); ++i)
|
return std::find(std::begin(defaultTextures), std::end(defaultTextures), name) != std::end(defaultTextures);
|
||||||
if (name == defaultTextures[i])
|
|
||||||
return true;
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShaderVisitor::applyStateSet(osg::ref_ptr<osg::StateSet> stateset, osg::Node& node)
|
void ShaderVisitor::applyStateSet(osg::ref_ptr<osg::StateSet> stateset, osg::Node& node)
|
||||||
|
|
Loading…
Reference in a new issue