diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2022-06-01 13:03:07 +0200 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2022-06-28 10:52:23 +0200 |
commit | d4b27d9b527c113452987a9af83c54d4f5d077d3 (patch) | |
tree | b15bd3ac708e03bd47f08155f6ca09e353b644a1 | |
parent | f814cc6a7911f6cf14ce443f41c2336bc1d213c6 (diff) |
Avoid including qopenglfunctions header files if Qt is built with GLES2
Change-Id: I3a7a69f5eef604408713934811efb984e78d68dd
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r-- | src/opengl/qopenglvertexarrayobject.cpp | 7 | ||||
-rw-r--r-- | 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 18c9d09e19..98374fb9e2 100644 --- a/src/opengl/qopenglvertexarrayobject.cpp +++ b/src/opengl/qopenglvertexarrayobject.cpp @@ -10,8 +10,11 @@ #include <QtGui/qguiapplication.h> #include <QtOpenGL/QOpenGLVersionFunctionsFactory> -#include <QtOpenGL/qopenglfunctions_3_0.h> -#include <QtOpenGL/qopenglfunctions_3_2_core.h> + +#if !QT_CONFIG(opengles2) +# include <QtOpenGL/qopenglfunctions_3_0.h> +# include <QtOpenGL/qopenglfunctions_3_2_core.h> +#endif #include <private/qopenglcontext_p.h> #include <private/qopenglextensions_p.h> diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp index 4e81af6cf3..58e09f7d1b 100644 --- a/tests/auto/gui/qopengl/tst_qopengl.cpp +++ b/tests/auto/gui/qopengl/tst_qopengl.cpp @@ -7,7 +7,9 @@ #include <QtOpenGL/qopengltextureblitter.h> #include <QtOpenGL/QOpenGLVertexArrayObject> #include <QtOpenGL/QOpenGLBuffer> -#include <QtOpenGL/QOpenGLFunctions_4_2_Core> +#if !QT_CONFIG(opengles2) +# include <QtOpenGL/QOpenGLFunctions_4_2_Core> +#endif #include <QtOpenGL/QOpenGLVersionFunctionsFactory> #include <QtGui/private/qopenglcontext_p.h> #include <QtGui/QOpenGLFunctions> |