From d4b27d9b527c113452987a9af83c54d4f5d077d3 Mon Sep 17 00:00:00 2001 From: Alexey Edelev Date: Wed, 1 Jun 2022 13:03:07 +0200 Subject: [PATCH] Avoid including qopenglfunctions header files if Qt is built with GLES2 Change-Id: I3a7a69f5eef604408713934811efb984e78d68dd Reviewed-by: Alexandru Croitor --- src/opengl/qopenglvertexarrayobject.cpp | 7 +++++-- tests/auto/gui/qopengl/tst_qopengl.cpp | 4 +++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/opengl/qopenglvertexarrayobject.cpp b/src/opengl/qopenglvertexarrayobject.cpp index 18c9d09e191..98374fb9e24 100644 --- a/src/opengl/qopenglvertexarrayobject.cpp +++ b/src/opengl/qopenglvertexarrayobject.cpp @@ -10,8 +10,11 @@ #include #include -#include -#include + +#if !QT_CONFIG(opengles2) +# include +# include +#endif #include #include diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp index 4e81af6cf33..58e09f7d1b3 100644 --- a/tests/auto/gui/qopengl/tst_qopengl.cpp +++ b/tests/auto/gui/qopengl/tst_qopengl.cpp @@ -7,7 +7,9 @@ #include #include #include -#include +#if !QT_CONFIG(opengles2) +# include +#endif #include #include #include