summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp')
-rw-r--r--tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp7
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 a1b585d0d3..778ff1d932 100644
--- a/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp
+++ b/tests/auto/widgets/widgets/qopenglwidget/tst_qopenglwidget.cpp
@@ -284,6 +284,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, &currentFbo);
+ GLuint defFbo = QOpenGLContext::currentContext()->defaultFramebufferObject();
+ QCOMPARE(GLuint(currentFbo), defFbo);
}
void tst_QOpenGLWidget::asViewport()