Make Logout Effect work again with OpenGL 2 backend
It's more of a hack, but at least it is working again. Still needs a proper rewrite to also support GLES.
This commit is contained in:
parent
982f041204
commit
fda841787f
1 changed files with 10 additions and 0 deletions
|
@ -215,6 +215,12 @@ void LogoutEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
|
|||
//--------------------------
|
||||
// Render the screen effect
|
||||
|
||||
// HACK: the GL code is still OpenGL 1, so we have to unbind the shader.
|
||||
GLint shader = 0;
|
||||
if (ShaderManager::instance()->isShaderBound()) {
|
||||
glGetIntegerv(GL_CURRENT_PROGRAM, &shader);
|
||||
glUseProgram(0);
|
||||
}
|
||||
glPushAttrib(GL_CURRENT_BIT | GL_ENABLE_BIT | GL_TEXTURE_BIT);
|
||||
|
||||
// Unmodified base image
|
||||
|
@ -255,6 +261,10 @@ void LogoutEffect::paintScreen(int mask, QRegion region, ScreenPaintData& data)
|
|||
renderVignetting();
|
||||
|
||||
glPopAttrib();
|
||||
// HACK: rebind previously bound shader
|
||||
if (ShaderManager::instance()->isShaderBound()) {
|
||||
glUseProgram(shader);
|
||||
}
|
||||
|
||||
//--------------------------
|
||||
|
||||
|
|
Loading…
Reference in a new issue