[drape] request depth buffer for drawable surface

This commit is contained in:
ExMix 2014-02-04 15:28:38 +03:00 committed by Alex Zolotarev
parent 7d8484441a
commit 09da505da8

View file

@ -9,7 +9,11 @@ MainWindow::MainWindow(QWidget *parent)
, m_surface(NULL)
{
resize(1200, 800);
DrapeSurface * surface = new DrapeSurface();
QSurfaceFormat format = surface->requestedFormat();
format.setDepthBufferSize(16);
surface->setFormat(format);
m_surface = QWidget::createWindowContainer(surface, this);
setCentralWidget(m_surface);
}