mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-12 08:25:03 -05:00
Always link shader program if OglId is zero
The OpenGL resources can be invalidated at any time. Make sure that the shader program is linked if this happens.
This commit is contained in:
1 parent
ce513be638
commit
2250084176
1 file changed
+4
@@ -230,6 +230,10 @@ void OverlayImage::render(OpenGLContext* oglContext, const Vec2i& position, cons
|
||||
|
||||
gen.addFragmentCode(ShaderSourceRepository::fs_Unlit);
|
||||
m_shaderProgram = gen.generate();
|
||||
}
|
||||
|
||||
if (m_shaderProgram->programOglId() == 0)
|
||||
{
|
||||
m_shaderProgram->linkProgram(oglContext);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user