diff options
Diffstat (limited to 'examples/qwindow-compositor/qopenglwindow.cpp')
-rw-r--r-- | examples/qwindow-compositor/qopenglwindow.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/qwindow-compositor/qopenglwindow.cpp b/examples/qwindow-compositor/qopenglwindow.cpp new file mode 100644 index 0000000..2a53c4c --- /dev/null +++ b/examples/qwindow-compositor/qopenglwindow.cpp @@ -0,0 +1,13 @@ +#include "qopenglwindow.h" + +QOpenGLWindow::QOpenGLWindow(const QSurfaceFormat &format, const QRect &geometry) + : m_format(format) +{ + setSurfaceType(QWindow::OpenGLSurface); + setGeometry(geometry); + setFormat(format); + create(); + m_context = new QOpenGLContext; + m_context->setFormat(format); + m_context->create(); +} |