diff options
Diffstat (limited to 'examples/opengl/threadedqopenglwidget/main.cpp')
-rw-r--r-- | examples/opengl/threadedqopenglwidget/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/opengl/threadedqopenglwidget/main.cpp b/examples/opengl/threadedqopenglwidget/main.cpp index 046a24d576..75b7f5e46f 100644 --- a/examples/opengl/threadedqopenglwidget/main.cpp +++ b/examples/opengl/threadedqopenglwidget/main.cpp @@ -40,6 +40,7 @@ #include <QApplication> #include <QMainWindow> +#include <QSurfaceFormat> #include "mainwindow.h" #include "glwidget.h" @@ -47,6 +48,10 @@ int main( int argc, char ** argv ) { QApplication a( argc, argv ); + QSurfaceFormat format; + format.setDepthBufferSize(16); + QSurfaceFormat::setDefaultFormat(format); + // Two top-level windows with two QOpenGLWidget children in each. // The rendering for the four QOpenGLWidgets happens on four separate threads. MainWindow mw1; |