Fix incorrect shader state after shader interface creation

Use store-current-and-restore-previous OpenGL program in the OpenGL
Shader Interface. This is a better fix for the initial error, which
additionally solves interface artifacts when opening non-default
startyp files on macOS with AMD GPU.
This commit is contained in:
2022-10-20 10:09:32 +02:00
parent 90686ff6f4
commit ff157d7eba
2 changed files with 10 additions and 5 deletions

View File

@@ -1004,11 +1004,6 @@ bool GLShader::finalize(const shader::ShaderCreateInfo *info)
else {
interface = new GLShaderInterface(shader_program_);
}
/**
* WORKAROUND: Creating the shader interface changes the active program.
* Make sure to update the context, otherwise we might have a missing bind.
*/
Context::get()->shader = this;
return true;
}