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>
This commit is contained in:
Richard Moe Gustavsen 2013-04-17 11:44:40 +02:00 committed by The Qt Project
parent 96134c6f58
commit e9b2d029f9

View File

@ -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();
}