Skip to content
Permalink
Browse files

gl_shader: also checksum engine constants to invalide the shader on c…

…var change
  • Loading branch information...
illwieckz committed Jul 6, 2019
1 parent 145ff5f commit a74f1c600805092cc484946fdc6c4edab0ba2396
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/engine/renderer/gl_shader.cpp
@@ -842,7 +842,7 @@ void GLShaderManager::InitShader( GLShader *shader )

shader->_vertexShaderText = BuildGPUShaderText( shader->GetMainShaderName(), vertexInlines, GL_VERTEX_SHADER );
shader->_fragmentShaderText = BuildGPUShaderText( shader->GetMainShaderName(), fragmentInlines, GL_FRAGMENT_SHADER );
std::string combinedShaderText= shader->_vertexShaderText + shader->_fragmentShaderText;
std::string combinedShaderText = GLEngineConstants.getText() + shader->_vertexShaderText + shader->_fragmentShaderText;

shader->_checkSum = Com_BlockChecksum( combinedShaderText.c_str(), combinedShaderText.length() );
}

0 comments on commit a74f1c6

Please sign in to comment.
You can’t perform that action at this time.