diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2021-01-11 11:21:05 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-01-20 06:39:56 +0000 |
commit | 280908398d793be0dc25181cff5394dd036e4d8d (patch) | |
tree | a60dc51feba3575b81bde2461f6ef7133cb32f90 /tests | |
parent | 8d51a7a39e9d20b0b484175ef9634c28ea7136fa (diff) |
Fix lancelot GL painting test for GLES
RGB10 internal texture format is not supported on GLES, use RGB10_A2
instead.
Change-Id: Ib43eb99b170f441e886be50d29a6a5f7696c05c7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
(cherry picked from commit 167bcafcb6b1988047bec8b4d67c994fc8c85c14)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/other/lancelot/tst_lancelot.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/auto/other/lancelot/tst_lancelot.cpp b/tests/auto/other/lancelot/tst_lancelot.cpp index 1f0066eebb..7a85e9c370 100644 --- a/tests/auto/other/lancelot/tst_lancelot.cpp +++ b/tests/auto/other/lancelot/tst_lancelot.cpp @@ -42,6 +42,9 @@ #ifndef GL_RGB10 #define GL_RGB10 0x8052 #endif +#ifndef GL_RGB10_A2 +#define GL_RGB10_A2 0x8059 +#endif class tst_Lancelot : public QObject { @@ -355,15 +358,15 @@ void tst_Lancelot::runTestSuite(GraphicsEngine engine, QImage::Format format, co win.setSurfaceType(QSurface::OpenGLSurface); win.setFormat(contextFormat); win.create(); - QOpenGLFramebufferObjectFormat fmt; - fmt.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil); - fmt.setSamples(4); - if (format == QImage::Format_BGR30) - fmt.setInternalTextureFormat(GL_RGB10); QOpenGLContext ctx; ctx.setFormat(contextFormat); QVERIFY(ctx.create()); QVERIFY(ctx.makeCurrent(&win)); + QOpenGLFramebufferObjectFormat fmt; + fmt.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil); + fmt.setSamples(4); + if (format == QImage::Format_BGR30) + fmt.setInternalTextureFormat(ctx.isOpenGLES() ? GL_RGB10_A2 : GL_RGB10); QOpenGLFramebufferObject fbo(800, 800, fmt); fbo.bind(); QOpenGLPaintDevice pdv(800, 800); |