summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 91df197..e24742f 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -654,6 +654,9 @@ void QGL2PaintEngineEx::sync()
glDisable(GL_BLEND);
glActiveTexture(GL_TEXTURE0);
+
+ d->needsSync = true;
+ d->shaderManager->setDirty();
}
void QGL2PaintEngineExPrivate::transferMode(EngineMode newMode)
@@ -1216,6 +1219,7 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev)
d->simpleShaderDepthUniformDirty = true;
d->depthUniformDirty = true;
d->opacityUniformDirty = true;
+ d->needsSync = false;
d->use_system_clip = !systemClip().isEmpty();
@@ -1294,11 +1298,15 @@ void QGL2PaintEngineEx::ensureActive()
ctx->d_ptr->active_engine = this;
- glDisable(GL_DEPTH_TEST);
+ d->needsSync = true;
+ }
+ if (d->needsSync) {
glViewport(0, 0, d->width, d->height);
-
+ glDepthMask(false);
+ glDepthFunc(GL_LEQUAL);
setState(state());
+ d->needsSync = false;
}
}