1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-01 03:21:41 +00:00

Reduce error spam

This commit is contained in:
scrawl 2017-11-07 23:54:31 +01:00
parent 7b4add2ae4
commit 244cc5b861

View File

@ -131,7 +131,11 @@ namespace Shader
{
std::string shaderSource = templateIt->second;
if (!parseDefines(shaderSource, defines))
{
// Add to the cache anyway to avoid logging the same error over and over.
mShaders.insert(std::make_pair(std::make_pair(shaderTemplate, defines), nullptr));
return NULL;
}
osg::ref_ptr<osg::Shader> shader (new osg::Shader(shaderType));
shader->setShaderSource(shaderSource);