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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user