diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-03-17 15:55:00 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2017-03-18 17:37:45 +0000 |
commit | c1a2f97a3b3a8c058b1760b57e5c83bf7815b84a (patch) | |
tree | 78a5100cb1302396c0f0f9e7bd00652232d0a666 /tests | |
parent | 9ef14bcc3a71a95d9338d360b429cd8a4061ad3d (diff) | |
download | qtbase-c1a2f97a3b3a8c058b1760b57e5c83bf7815b84a.tar.gz |
Set default fbo redirect correctly for QOpenGLWidget viewports
Task-number: QTBUG-59318
Change-Id: Icf2ea4e5ebdeec31750edc8b34a9b9f6bfb64744
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp index e3e26d612f..f13291d0a9 100644 --- a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp +++ b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp @@ -282,6 +282,13 @@ protected: void CountingGraphicsView::drawForeground(QPainter *, const QRectF &) { ++m_count; + + // QTBUG-59318: verify that the context's internal default fbo redirection + // is active also when using the QOpenGLWidget as a viewport. + GLint currentFbo = -1; + QOpenGLContext::currentContext()->functions()->glGetIntegerv(GL_FRAMEBUFFER_BINDING, ¤tFbo); + GLuint defFbo = QOpenGLContext::currentContext()->defaultFramebufferObject(); + QCOMPARE(GLuint(currentFbo), defFbo); } void tst_QOpenGLWidget::asViewport() |