diff options
author | Samuel Rødal <samuel.rodal@digia.com> | 2012-11-21 14:32:30 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-11-21 14:39:02 +0100 |
commit | 31c6d554458b27c88f432c2b9c37baacf5e4b454 (patch) | |
tree | 20e7c13fa60d8e9375975f2926261e901f82ca03 /src/opengl | |
parent | a2bc19c0ad67b948df624770498f76441bf6da91 (diff) | |
download | qtbase-31c6d554458b27c88f432c2b9c37baacf5e4b454.tar.gz |
Properly initialize glViewport() to appropriate value in QGLPixelBuffer.
Since we are using a hidden window in order to make the context current,
the viewport will end up with an arbitrary value. By setting it
explicitly we ensure compatibility with Qt 4.
Task-number: QTBUG-28115
Change-Id: I69fb5efda2b274b539c3d3b9fa842a2d32ad70b1
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/qglpixelbuffer.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp index 135f2edd01..d39ac3dea3 100644 --- a/src/opengl/qglpixelbuffer.cpp +++ b/src/opengl/qglpixelbuffer.cpp @@ -220,6 +220,7 @@ bool QGLPixelBuffer::makeCurrent() format.setSamples(d->req_format.samples()); d->fbo = new QOpenGLFramebufferObject(d->req_size, format); d->fbo->bind(); + glViewport(0, 0, d->req_size.width(), d->req_size.height()); } return true; } |