summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-03-11 09:37:13 (GMT)
committerGunnar Sletta <gunnar@trolltech.com>2009-04-01 14:32:57 (GMT)
commit4d4580b5f43adb22b6ba95f49698efcd5dbdfeae (patch)
tree9deef7e36903a688129f71a7ffa109da84c141d5 /src/opengl
parent56fc9b853f8d19999c81ed13a9f2fcd0e95241e2 (diff)
downloadQt-4d4580b5f43adb22b6ba95f49698efcd5dbdfeae.zip
Qt-4d4580b5f43adb22b6ba95f49698efcd5dbdfeae.tar.gz
Qt-4d4580b5f43adb22b6ba95f49698efcd5dbdfeae.tar.bz2
Fixes: Make FBO window surface work with GL 2 paint engine.
RevBy: Trond Details: Need to make sure clipping/scissoring etc is turned off and that we are in a good state.
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp3
-rw-r--r--src/opengl/qwindowsurface_gl.cpp4
2 files changed, 7 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index dbf18b1..89ed1f7 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1062,6 +1062,9 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev)
bool QGL2PaintEngineEx::end()
{
Q_D(QGL2PaintEngineEx);
+ QGLContext *ctx = d->ctx;
+ glUseProgram(0);
+ d->transferMode(DefaultMode);
d->drawable.swapBuffers();
d->drawable.doneCurrent();
return false;
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index 08c2aab..5cd4366 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -439,6 +439,9 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint &
if (d_ptr->fbo)
d_ptr->fbo->release();
+ glDisable(GL_DEPTH_TEST);
+ glDisable(GL_SCISSOR_TEST);
+
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
@@ -539,6 +542,7 @@ void QGLWindowSurface::updateGeometry()
d_ptr->fbo->bind();
if (d_ptr->fbo->isValid()) {
+ qDebug() << "Created Window Surface FBO" << rect.size();
return;
} else {
qDebug() << "QGLWindowSurface: Failed to create valid FBO, falling back";