diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2021-01-11 11:21:05 +0100 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2021-01-18 07:42:31 +0100 |
commit | 167bcafcb6b1988047bec8b4d67c994fc8c85c14 (patch) | |
tree | 43db44bf9d5b49f6ce873f550f560822e1f355eb /tests | |
parent | b59f77aab461302f51a9a4d395349fbb4b072b55 (diff) |
Fix lancelot GL painting test for GLES
RGB10 internal texture format is not supported on GLES, use RGB10_A2
instead.
Pick-to: 6.0
Change-Id: Ib43eb99b170f441e886be50d29a6a5f7696c05c7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
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); |