diff options
author | Richard Moe Gustavsen <richard.gustavsen@digia.com> | 2013-04-17 11:44:40 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-19 09:57:09 +0200 |
commit | e9b2d029f978a4a55197af82f97f7c302207eb01 (patch) | |
tree | 73b308993d6d2abd332c2044c1b25b709d2b0b95 /src/plugins/platforms | |
parent | 96134c6f585963c9d449db17589f21e67519a2a8 (diff) |
iOS: QIOSBackingStore: enable FBO depth and stencil buffer
Unless we enable those buffers for the FBO that backs the
backingstore, setting a clip region on an associated QPainter
will not work.
One apparent bug from this was the menubar. Without this patch
it appeared to never be drawn. The reason was that we ended up
drawing the menubar background over the whole menubar instead
of inside the clip region.
Change-Id: I25660cec6ce9e43fe4cd693127dca6afeb8dcf65
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/ios/qiosbackingstore.mm | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/platforms/ios/qiosbackingstore.mm b/src/plugins/platforms/ios/qiosbackingstore.mm index 566ff3a672..f3c1af2b2d 100644 --- a/src/plugins/platforms/ios/qiosbackingstore.mm +++ b/src/plugins/platforms/ios/qiosbackingstore.mm @@ -52,7 +52,11 @@ QIOSBackingStore::QIOSBackingStore(QWindow *window) , m_context(new QOpenGLContext) , m_device(0) { - m_context->setFormat(window->requestedFormat()); + QSurfaceFormat fmt = window->requestedFormat(); + fmt.setDepthBufferSize(16); + fmt.setStencilBufferSize(8); + + m_context->setFormat(fmt); m_context->setScreen(window->screen()); m_context->create(); } |