diff options
author | Johan Klokkhammer Helsing <johan.helsing@qt.io> | 2017-12-12 16:58:53 +0100 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@qt.io> | 2017-12-13 15:00:02 +0000 |
commit | 13f09acb665225a0b6bb5f20b01e01450ddb19aa (patch) | |
tree | ef5385038a8726640c3bd8ae9ab3664273848cef /tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp | |
parent | 9e99dba4a22bbf212b3e6d1e2607a16dbbd04d90 (diff) |
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 <laszlo.agocs@qt.io>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp')
-rw-r--r-- | tests/auto/gui/kernel/qopenglwindow/tst_qopenglwindow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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()); } }; |