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:
Magne Sjaastad committed 2024-02-07 10:07:18 +01:00
1 parent ce513be638
commit 2250084176
1 file changed
+4
+4
View File
@@ -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);
}