1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-28 11:39:42 +00:00

And one more

This commit is contained in:
jvoisin 2022-05-21 22:08:20 +02:00
parent 9ce26ef4b6
commit 02cafc3b98

View file

@ -292,12 +292,9 @@ namespace Shader
}
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)
if (name == defaultTextures[i])
return true;
return false;
return std::find(std::begin(defaultTextures), std::end(defaultTextures), name) != std::end(defaultTextures);
}
void ShaderVisitor::applyStateSet(osg::ref_ptr<osg::StateSet> stateset, osg::Node& node)