From 13f09acb665225a0b6bb5f20b01e01450ddb19aa Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Tue, 12 Dec 2017 16:58:53 +0100 Subject: Make tst_QOpenGLWindow pass on platforms where the default FBO != 0 The test would fail on Wayland with window decorations enabled because there window content is drawn to an FBO before it's blended with the window decorations (also drawn by the client). Task-number: QTBUG-51741 Change-Id: I7c74ad235c6a2d50231a9f863da1810675dd4eae Reviewed-by: Laszlo Agocs Reviewed-by: Andy Nichols Reviewed-by: Paul Olav Tvete --- tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp') diff --git a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp index f74ae00bff..8ffd1bb9b4 100644 --- a/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp +++ b/tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp @@ -252,7 +252,7 @@ public: GLuint fbo = 0xFFFF; QOpenGLContext::currentContext()->functions()->glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint *) &fbo); - QCOMPARE(fbo, GLuint(0)); + QCOMPARE(fbo, QOpenGLContext::currentContext()->defaultFramebufferObject()); } void paintGL() override { @@ -264,7 +264,7 @@ public: // Using PartialUpdateBlend so paintGL() targets a user fbo, not the default. GLuint fbo = 0xFFFF; QOpenGLContext::currentContext()->functions()->glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint *) &fbo); - QVERIFY(fbo != 0); + QVERIFY(fbo != QOpenGLContext::currentContext()->defaultFramebufferObject()); QCOMPARE(fbo, defaultFramebufferObject()); } @@ -276,7 +276,7 @@ public: GLuint fbo = 0xFFFF; QOpenGLContext::currentContext()->functions()->glGetIntegerv(GL_FRAMEBUFFER_BINDING, (GLint *) &fbo); - QCOMPARE(fbo, GLuint(0)); + QCOMPARE(fbo, QOpenGLContext::currentContext()->defaultFramebufferObject()); } }; -- cgit v1.2.3