From e9b2d029f978a4a55197af82f97f7c302207eb01 Mon Sep 17 00:00:00 2001 From: Richard Moe Gustavsen Date: Wed, 17 Apr 2013 11:44:40 +0200 Subject: iOS: QIOSBackingStore: enable FBO depth and stencil buffer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/plugins/platforms/ios/qiosbackingstore.mm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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(); } -- cgit v1.2.3