summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/configure.cmake6
-rw-r--r--src/gui/configure.json14
-rw-r--r--src/gui/kernel/qopenglcontext.cpp6
-rw-r--r--src/gui/kernel/qplatformgraphicsbufferhelper.cpp2
-rw-r--r--src/gui/opengl/qopengl.h18
-rw-r--r--src/gui/opengl/qopenglextrafunctions.h2
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp6
-rw-r--r--src/gui/opengl/qopenglfunctions.h286
-rw-r--r--src/gui/opengl/qopenglprogrambinarycache.cpp6
-rw-r--r--src/gui/opengl/qopenglprogrambinarycache_p.h2
-rw-r--r--src/opengl/qopenglbuffer.cpp2
-rw-r--r--src/opengl/qopenglframebufferobject.cpp4
-rw-r--r--src/opengl/qopenglframebufferobject_p.h2
-rw-r--r--src/opengl/qopenglfunctions_1_0.h4
-rw-r--r--src/opengl/qopenglfunctions_1_1.h4
-rw-r--r--src/opengl/qopenglfunctions_1_2.h4
-rw-r--r--src/opengl/qopenglfunctions_1_3.h4
-rw-r--r--src/opengl/qopenglfunctions_1_4.h4
-rw-r--r--src/opengl/qopenglfunctions_1_5.h4
-rw-r--r--src/opengl/qopenglfunctions_2_0.h4
-rw-r--r--src/opengl/qopenglfunctions_2_1.h4
-rw-r--r--src/opengl/qopenglfunctions_3_0.h4
-rw-r--r--src/opengl/qopenglfunctions_3_1.h4
-rw-r--r--src/opengl/qopenglfunctions_3_2_compatibility.h4
-rw-r--r--src/opengl/qopenglfunctions_3_2_core.h4
-rw-r--r--src/opengl/qopenglfunctions_3_3_compatibility.h4
-rw-r--r--src/opengl/qopenglfunctions_3_3_core.h4
-rw-r--r--src/opengl/qopenglfunctions_4_0_compatibility.h4
-rw-r--r--src/opengl/qopenglfunctions_4_0_core.h4
-rw-r--r--src/opengl/qopenglfunctions_4_1_compatibility.h4
-rw-r--r--src/opengl/qopenglfunctions_4_1_core.h4
-rw-r--r--src/opengl/qopenglfunctions_4_2_compatibility.h4
-rw-r--r--src/opengl/qopenglfunctions_4_2_core.h4
-rw-r--r--src/opengl/qopenglfunctions_4_3_compatibility.h4
-rw-r--r--src/opengl/qopenglfunctions_4_3_core.h4
-rw-r--r--src/opengl/qopenglfunctions_4_4_compatibility.h4
-rw-r--r--src/opengl/qopenglfunctions_4_4_core.h4
-rw-r--r--src/opengl/qopenglfunctions_4_5_compatibility.h4
-rw-r--r--src/opengl/qopenglfunctions_4_5_core.h4
-rw-r--r--src/opengl/qopenglfunctions_es2.h4
-rw-r--r--src/opengl/qopenglpaintengine.cpp12
-rw-r--r--src/opengl/qopenglqueryhelper_p.h2
-rw-r--r--src/opengl/qopenglshaderprogram.cpp24
-rw-r--r--src/opengl/qopengltexture.cpp22
-rw-r--r--src/opengl/qopengltextureglyphcache.cpp10
-rw-r--r--src/opengl/qopengltexturehelper.cpp4
-rw-r--r--src/opengl/qopengltexturehelper_p.h4
-rw-r--r--src/opengl/qopengltimerquery.h2
-rw-r--r--src/opengl/qopenglversionfunctions.cpp8
-rw-r--r--src/opengl/qopenglversionfunctions.h4
-rw-r--r--src/opengl/qopenglversionfunctionsfactory.cpp8
-rw-r--r--src/opengl/qopenglvertexarrayobject.cpp8
-rw-r--r--src/openglextensions/qopenglextensions.cpp2
-rw-r--r--src/openglextensions/qopenglextensions.h2
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext.cpp16
-rw-r--r--src/plugins/platforms/windows/qwindowseglcontext.cpp2
-rw-r--r--src/plugins/platforms/windows/qwindowsintegration.cpp8
-rw-r--r--src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp2
-rw-r--r--src/widgets/kernel/qwidget.cpp2
-rw-r--r--tests/auto/cmake/test_openglextensions_module/main.cpp2
-rw-r--r--tests/auto/gui/qopengl/tst_qopengl.cpp10
-rw-r--r--tests/auto/opengl/qgl/tst_qgl.cpp10
-rw-r--r--util/glgen/codegenerator.cpp4
-rw-r--r--util/glgen/qopenglextensions.cpp.header3
-rw-r--r--util/glgen/qopenglextensions.h.header3
-rw-r--r--util/glgen/qopenglversionfunctions.cpp.footer2
-rw-r--r--util/glgen/qopenglversionfunctions.cpp.header2
-rw-r--r--util/glgen/qopenglversionfunctions.h.footer2
-rw-r--r--util/glgen/qopenglversionfunctions.h.header2
-rw-r--r--util/glgen/qopenglversionfunctions__VERSION__.h.footer2
-rw-r--r--util/glgen/qopenglversionfunctions__VERSION__.h.header2
71 files changed, 318 insertions, 332 deletions
diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake
index fde2c9a29e..4354fea8bb 100644
--- a/src/gui/configure.cmake
+++ b/src/gui/configure.cmake
@@ -541,7 +541,6 @@ qt_feature("angle" PUBLIC
AUTODETECT QT_FEATURE_opengles2 OR QT_FEATURE_opengl_dynamic
CONDITION NOT QT_FEATURE_opengl_desktop AND QT_FEATURE_dxguid AND tests.fxc AND ( QT_FEATURE_direct3d9 OR ( WINRT AND QT_FEATURE_direct3d11 AND libs.d3dcompiler ) ) OR FIXME
)
-qt_feature_definition("angle" "QT_OPENGL_ES_2_ANGLE")
qt_feature("angle_d3d11_qdtd" PRIVATE
LABEL "D3D11_QUERY_DATA_TIMESTAMP_DISJOINT"
CONDITION QT_FEATURE_angle AND TEST_angle_d3d11_qdtd
@@ -710,24 +709,19 @@ qt_feature("opengles2" PUBLIC
ENABLE INPUT_opengl STREQUAL 'es2' OR INPUT_angle STREQUAL 'yes'
DISABLE INPUT_opengl STREQUAL 'desktop' OR INPUT_opengl STREQUAL 'dynamic' OR INPUT_opengl STREQUAL 'no'
)
-qt_feature_definition("opengles2" "QT_OPENGL_ES")
-qt_feature_definition("opengles2" "QT_OPENGL_ES_2")
qt_feature_config("opengles2" QMAKE_PUBLIC_QT_CONFIG)
qt_feature("opengles3" PUBLIC
LABEL "OpenGL ES 3.0"
CONDITION QT_FEATURE_opengles2 AND NOT QT_FEATURE_angle AND TEST_opengles3
)
-qt_feature_definition("opengles3" "QT_OPENGL_ES_3")
qt_feature("opengles31" PUBLIC
LABEL "OpenGL ES 3.1"
CONDITION QT_FEATURE_opengles3 AND TEST_opengles31
)
-qt_feature_definition("opengles31" "QT_OPENGL_ES_3_1")
qt_feature("opengles32" PUBLIC
LABEL "OpenGL ES 3.2"
CONDITION QT_FEATURE_opengles31 AND TEST_opengles32
)
-qt_feature_definition("opengles32" "QT_OPENGL_ES_3_2")
qt_feature("opengl-desktop"
LABEL "Desktop OpenGL"
CONDITION ( WIN32 AND NOT WINRT AND NOT QT_FEATURE_opengles2 AND ( MSVC OR OpenGL_OpenGL_FOUND ) ) OR ( NOT WATCHOS AND NOT WIN32 AND NOT WASM AND OpenGL_OpenGL_FOUND )
diff --git a/src/gui/configure.json b/src/gui/configure.json
index cf33408991..3a3f579446 100644
--- a/src/gui/configure.json
+++ b/src/gui/configure.json
@@ -1115,7 +1115,6 @@
"condition": "!features.opengl-desktop && features.dxguid && tests.fxc && (features.direct3d9 || (config.winrt && features.direct3d11 && libs.d3dcompiler))",
"output": [
"publicFeature",
- { "type": "define", "name": "QT_OPENGL_ES_2_ANGLE" },
{ "type": "varAssign", "name": "QMAKE_FXC_LOCATION", "value": "tests.fxc.value" }
]
},
@@ -1319,33 +1318,28 @@
"condition": "(config.win32 && !features.opengl-dynamic) || (!config.watchos && !features.opengl-desktop && libs.opengl_es2)",
"output": [
"publicFeature",
- "publicQtConfig",
- { "type": "define", "name": "QT_OPENGL_ES" },
- { "type": "define", "name": "QT_OPENGL_ES_2" }
+ "publicQtConfig"
]
},
"opengles3": {
"label": "OpenGL ES 3.0",
"condition": "features.opengles2 && !features.angle && tests.opengles3",
"output": [
- "publicFeature",
- { "type": "define", "name": "QT_OPENGL_ES_3" }
+ "publicFeature"
]
},
"opengles31": {
"label": "OpenGL ES 3.1",
"condition": "features.opengles3 && tests.opengles31",
"output": [
- "publicFeature",
- { "type": "define", "name": "QT_OPENGL_ES_3_1" }
+ "publicFeature"
]
},
"opengles32": {
"label": "OpenGL ES 3.2",
"condition": "features.opengles31 && tests.opengles32",
"output": [
- "publicFeature",
- { "type": "define", "name": "QT_OPENGL_ES_3_2" }
+ "publicFeature"
]
},
"opengl-desktop": {
diff --git a/src/gui/kernel/qopenglcontext.cpp b/src/gui/kernel/qopenglcontext.cpp
index a004d9e10d..9a03333537 100644
--- a/src/gui/kernel/qopenglcontext.cpp
+++ b/src/gui/kernel/qopenglcontext.cpp
@@ -206,7 +206,7 @@ int QOpenGLContextPrivate::maxTextureSize()
QOpenGLFunctions *funcs = q->functions();
funcs->glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size);
-#ifndef QT_OPENGL_ES
+#if !QT_CONFIG(opengles2)
if (!q->isOpenGLES()) {
GLenum proxy = GL_PROXY_TEXTURE_2D;
@@ -232,7 +232,7 @@ int QOpenGLContextPrivate::maxTextureSize()
max_texture_size = size;
}
-#endif // QT_OPENGL_ES
+#endif // QT_CONFIG(opengles2)
return max_texture_size;
}
@@ -957,7 +957,7 @@ QOpenGLContext::OpenGLModuleType QOpenGLContext::openGLModuleType()
#if defined(QT_OPENGL_DYNAMIC)
Q_ASSERT(qGuiApp);
return QGuiApplicationPrivate::instance()->platformIntegration()->openGLModuleType();
-#elif defined(QT_OPENGL_ES_2)
+#elif QT_CONFIG(opengles2)
return LibGLES;
#else
return LibGL;
diff --git a/src/gui/kernel/qplatformgraphicsbufferhelper.cpp b/src/gui/kernel/qplatformgraphicsbufferhelper.cpp
index c67e6d15cb..34cb7d0274 100644
--- a/src/gui/kernel/qplatformgraphicsbufferhelper.cpp
+++ b/src/gui/kernel/qplatformgraphicsbufferhelper.cpp
@@ -213,7 +213,7 @@ bool QPlatformGraphicsBufferHelper::bindSWToTexture(const QPlatformGraphicsBuffe
if (rect.isNull() || rect == QRect(QPoint(0,0),size)) {
funcs->glTexImage2D(GL_TEXTURE_2D, 0, internalFormat, size.width(), size.height(), 0, GL_RGBA, pixelType, image.constBits());
} else {
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
if (!ctx->isOpenGLES()) {
funcs->glPixelStorei(GL_UNPACK_ROW_LENGTH, image.width());
funcs->glTexSubImage2D(GL_TEXTURE_2D, 0, rect.x(), rect.y(), rect.width(), rect.height(), GL_RGBA, pixelType,
diff --git a/src/gui/opengl/qopengl.h b/src/gui/opengl/qopengl.h
index 3a2393ea58..995206f248 100644
--- a/src/gui/opengl/qopengl.h
+++ b/src/gui/opengl/qopengl.h
@@ -63,9 +63,9 @@
// access to additional functionality the drivers may expose but
// which the system headers do not.
-#if defined(QT_OPENGL_ES_2)
+#if QT_CONFIG(opengles2)
# if defined(Q_OS_IOS) || defined(Q_OS_TVOS)
-# if defined(QT_OPENGL_ES_3)
+# if QT_CONFIG(opengles3)
# include <OpenGLES/ES3/gl.h>
# include <OpenGLES/ES3/glext.h>
# else
@@ -83,7 +83,7 @@ typedef void* GLeglImageOES;
# elif !defined(Q_OS_DARWIN) // "uncontrolled" ES2 platforms
-// In "es2" builds (QT_OPENGL_ES_2) additional defines indicate GLES 3.0 or
+// In "es2" builds (QT_CONFIG(opengles2)) additional defines indicate GLES 3.0 or
// higher is available *at build time*. In this case include the corresponding
// header. These are backwards compatible and it should be safe to include
// headers on top of each other, meaning that applications can include gl2.h
@@ -101,11 +101,11 @@ typedef void* GLeglImageOES;
# define QGL_TEMP_GLEXT_PROTO
# endif
-# if defined(QT_OPENGL_ES_3_2)
+# if QT_CONFIG(opengles32)
# include <GLES3/gl32.h>
-# elif defined(QT_OPENGL_ES_3_1)
+# elif QT_CONFIG(opengles31)
# include <GLES3/gl31.h>
-# elif defined(QT_OPENGL_ES_3)
+# elif QT_CONFIG(opengles3)
# include <GLES3/gl3.h>
# else
# include <GLES2/gl2.h>
@@ -145,10 +145,10 @@ typedef char GLchar;
# endif
# include <QtGui/qopenglext.h>
# endif // Q_OS_MAC
-#endif // QT_OPENGL_ES_2
+#endif // !QT_CONFIG(opengles2)
// Desktops can support OpenGL 4.
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
#define QT_OPENGL_3
#define QT_OPENGL_3_2
#define QT_OPENGL_4
@@ -162,7 +162,7 @@ QT_BEGIN_NAMESPACE
// When all else fails we provide sensible fallbacks - this is needed to
// allow compilation on OS X 10.6
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
// OS X 10.6 doesn't define these which are needed below
// OS X 10.7 and later defien them in gl3.h
diff --git a/src/gui/opengl/qopenglextrafunctions.h b/src/gui/opengl/qopenglextrafunctions.h
index faac2dce4e..4b02b1a60d 100644
--- a/src/gui/opengl/qopenglextrafunctions.h
+++ b/src/gui/opengl/qopenglextrafunctions.h
@@ -53,7 +53,7 @@
#endif
// GLES build without having included gl32.h -> GLDEBUGPROC is still need for the protos, define it here
-#if defined(QT_OPENGL_ES_2) && !defined(QT_OPENGL_ES_3_2)
+#if QT_CONFIG(opengles2) && !QT_CONFIG(opengles32)
typedef void (QOPENGLF_APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
#endif
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index 11ca802ee6..a95f064ac5 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -2129,7 +2129,7 @@ Func resolve(QOpenGLContext *context, const char *name, Func)
#define RESOLVE(name) \
resolve(context, "gl"#name, name)
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
// some fallback functions
static void QOPENGLF_APIENTRY qopenglfSpecialClearDepthf(GLclampf depth)
@@ -2167,14 +2167,14 @@ static void QOPENGLF_APIENTRY qopenglfSpecialReleaseShaderCompiler()
{
}
-#endif // !QT_OPENGL_ES_2
+#endif // !QT_CONFIG(opengles2)
QOpenGLFunctionsPrivate::QOpenGLFunctionsPrivate(QOpenGLContext *c)
{
init(c);
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
// setup fallbacks in case some methods couldn't get resolved
bool es = QOpenGLContext::currentContext()->isOpenGLES();
if (!f.ClearDepthf || !es)
diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h
index 4554291bbd..66bdac5ca5 100644
--- a/src/gui/opengl/qopenglfunctions.h
+++ b/src/gui/opengl/qopenglfunctions.h
@@ -56,7 +56,7 @@
//#define Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
-#ifdef QT_OPENGL_ES
+#if QT_CONFIG(opengles2)
typedef double GLdouble;
#endif
@@ -599,7 +599,7 @@ struct QOpenGLFunctionsPrivate
inline void QOpenGLFunctions::glBindTexture(GLenum target, GLuint texture)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glBindTexture(target, texture);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -610,7 +610,7 @@ inline void QOpenGLFunctions::glBindTexture(GLenum target, GLuint texture)
inline void QOpenGLFunctions::glBlendFunc(GLenum sfactor, GLenum dfactor)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glBlendFunc(sfactor, dfactor);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -621,7 +621,7 @@ inline void QOpenGLFunctions::glBlendFunc(GLenum sfactor, GLenum dfactor)
inline void QOpenGLFunctions::glClear(GLbitfield mask)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glClear(mask);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -632,7 +632,7 @@ inline void QOpenGLFunctions::glClear(GLbitfield mask)
inline void QOpenGLFunctions::glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glClearColor(red, green, blue, alpha);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -643,7 +643,7 @@ inline void QOpenGLFunctions::glClearColor(GLclampf red, GLclampf green, GLclamp
inline void QOpenGLFunctions::glClearStencil(GLint s)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glClearStencil(s);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -654,7 +654,7 @@ inline void QOpenGLFunctions::glClearStencil(GLint s)
inline void QOpenGLFunctions::glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glColorMask(red, green, blue, alpha);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -665,7 +665,7 @@ inline void QOpenGLFunctions::glColorMask(GLboolean red, GLboolean green, GLbool
inline void QOpenGLFunctions::glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glCopyTexImage2D(target, level, internalformat, x, y, width,height, border);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -676,7 +676,7 @@ inline void QOpenGLFunctions::glCopyTexImage2D(GLenum target, GLint level, GLenu
inline void QOpenGLFunctions::glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -687,7 +687,7 @@ inline void QOpenGLFunctions::glCopyTexSubImage2D(GLenum target, GLint level, GL
inline void QOpenGLFunctions::glCullFace(GLenum mode)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glCullFace(mode);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -698,7 +698,7 @@ inline void QOpenGLFunctions::glCullFace(GLenum mode)
inline void QOpenGLFunctions::glDeleteTextures(GLsizei n, const GLuint* textures)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glDeleteTextures(n, textures);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -709,7 +709,7 @@ inline void QOpenGLFunctions::glDeleteTextures(GLsizei n, const GLuint* textures
inline void QOpenGLFunctions::glDepthFunc(GLenum func)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glDepthFunc(func);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -720,7 +720,7 @@ inline void QOpenGLFunctions::glDepthFunc(GLenum func)
inline void QOpenGLFunctions::glDepthMask(GLboolean flag)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glDepthMask(flag);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -731,7 +731,7 @@ inline void QOpenGLFunctions::glDepthMask(GLboolean flag)
inline void QOpenGLFunctions::glDisable(GLenum cap)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glDisable(cap);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -742,7 +742,7 @@ inline void QOpenGLFunctions::glDisable(GLenum cap)
inline void QOpenGLFunctions::glDrawArrays(GLenum mode, GLint first, GLsizei count)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glDrawArrays(mode, first, count);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -753,7 +753,7 @@ inline void QOpenGLFunctions::glDrawArrays(GLenum mode, GLint first, GLsizei cou
inline void QOpenGLFunctions::glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glDrawElements(mode, count, type, indices);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -764,7 +764,7 @@ inline void QOpenGLFunctions::glDrawElements(GLenum mode, GLsizei count, GLenum
inline void QOpenGLFunctions::glEnable(GLenum cap)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glEnable(cap);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -775,7 +775,7 @@ inline void QOpenGLFunctions::glEnable(GLenum cap)
inline void QOpenGLFunctions::glFinish()
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glFinish();
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -786,7 +786,7 @@ inline void QOpenGLFunctions::glFinish()
inline void QOpenGLFunctions::glFlush()
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glFlush();
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -797,7 +797,7 @@ inline void QOpenGLFunctions::glFlush()
inline void QOpenGLFunctions::glFrontFace(GLenum mode)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glFrontFace(mode);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -808,7 +808,7 @@ inline void QOpenGLFunctions::glFrontFace(GLenum mode)
inline void QOpenGLFunctions::glGenTextures(GLsizei n, GLuint* textures)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGenTextures(n, textures);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -819,7 +819,7 @@ inline void QOpenGLFunctions::glGenTextures(GLsizei n, GLuint* textures)
inline void QOpenGLFunctions::glGetBooleanv(GLenum pname, GLboolean* params)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetBooleanv(pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -830,7 +830,7 @@ inline void QOpenGLFunctions::glGetBooleanv(GLenum pname, GLboolean* params)
inline GLenum QOpenGLFunctions::glGetError()
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
GLenum result = ::glGetError();
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -841,7 +841,7 @@ inline GLenum QOpenGLFunctions::glGetError()
inline void QOpenGLFunctions::glGetFloatv(GLenum pname, GLfloat* params)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetFloatv(pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -852,7 +852,7 @@ inline void QOpenGLFunctions::glGetFloatv(GLenum pname, GLfloat* params)
inline void QOpenGLFunctions::glGetIntegerv(GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetIntegerv(pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -863,7 +863,7 @@ inline void QOpenGLFunctions::glGetIntegerv(GLenum pname, GLint* params)
inline const GLubyte *QOpenGLFunctions::glGetString(GLenum name)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
const GLubyte *result = ::glGetString(name);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -875,7 +875,7 @@ inline const GLubyte *QOpenGLFunctions::glGetString(GLenum name)
inline void QOpenGLFunctions::glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetTexParameterfv(target, pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -886,7 +886,7 @@ inline void QOpenGLFunctions::glGetTexParameterfv(GLenum target, GLenum pname, G
inline void QOpenGLFunctions::glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetTexParameteriv(target, pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -897,7 +897,7 @@ inline void QOpenGLFunctions::glGetTexParameteriv(GLenum target, GLenum pname, G
inline void QOpenGLFunctions::glHint(GLenum target, GLenum mode)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glHint(target, mode);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -908,7 +908,7 @@ inline void QOpenGLFunctions::glHint(GLenum target, GLenum mode)
inline GLboolean QOpenGLFunctions::glIsEnabled(GLenum cap)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
GLboolean result = ::glIsEnabled(cap);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -920,7 +920,7 @@ inline GLboolean QOpenGLFunctions::glIsEnabled(GLenum cap)
inline GLboolean QOpenGLFunctions::glIsTexture(GLuint texture)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
GLboolean result = ::glIsTexture(texture);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -932,7 +932,7 @@ inline GLboolean QOpenGLFunctions::glIsTexture(GLuint texture)
inline void QOpenGLFunctions::glLineWidth(GLfloat width)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glLineWidth(width);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -943,7 +943,7 @@ inline void QOpenGLFunctions::glLineWidth(GLfloat width)
inline void QOpenGLFunctions::glPixelStorei(GLenum pname, GLint param)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glPixelStorei(pname, param);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -954,7 +954,7 @@ inline void QOpenGLFunctions::glPixelStorei(GLenum pname, GLint param)
inline void QOpenGLFunctions::glPolygonOffset(GLfloat factor, GLfloat units)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glPolygonOffset(factor, units);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -965,7 +965,7 @@ inline void QOpenGLFunctions::glPolygonOffset(GLfloat factor, GLfloat units)
inline void QOpenGLFunctions::glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glReadPixels(x, y, width, height, format, type, pixels);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -976,7 +976,7 @@ inline void QOpenGLFunctions::glReadPixels(GLint x, GLint y, GLsizei width, GLsi
inline void QOpenGLFunctions::glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glScissor(x, y, width, height);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -987,7 +987,7 @@ inline void QOpenGLFunctions::glScissor(GLint x, GLint y, GLsizei width, GLsizei
inline void QOpenGLFunctions::glStencilFunc(GLenum func, GLint ref, GLuint mask)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glStencilFunc(func, ref, mask);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -998,7 +998,7 @@ inline void QOpenGLFunctions::glStencilFunc(GLenum func, GLint ref, GLuint mask)
inline void QOpenGLFunctions::glStencilMask(GLuint mask)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glStencilMask(mask);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1009,7 +1009,7 @@ inline void QOpenGLFunctions::glStencilMask(GLuint mask)
inline void QOpenGLFunctions::glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glStencilOp(fail, zfail, zpass);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1020,7 +1020,7 @@ inline void QOpenGLFunctions::glStencilOp(GLenum fail, GLenum zfail, GLenum zpas
inline void QOpenGLFunctions::glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glTexImage2D(target, level, internalformat, width,height, border, format, type, pixels);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1031,7 +1031,7 @@ inline void QOpenGLFunctions::glTexImage2D(GLenum target, GLint level, GLint int
inline void QOpenGLFunctions::glTexParameterf(GLenum target, GLenum pname, GLfloat param)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glTexParameterf(target, pname, param);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1042,7 +1042,7 @@ inline void QOpenGLFunctions::glTexParameterf(GLenum target, GLenum pname, GLflo
inline void QOpenGLFunctions::glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glTexParameterfv(target, pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1053,7 +1053,7 @@ inline void QOpenGLFunctions::glTexParameterfv(GLenum target, GLenum pname, cons
inline void QOpenGLFunctions::glTexParameteri(GLenum target, GLenum pname, GLint param)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glTexParameteri(target, pname, param);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1064,7 +1064,7 @@ inline void QOpenGLFunctions::glTexParameteri(GLenum target, GLenum pname, GLint
inline void QOpenGLFunctions::glTexParameteriv(GLenum target, GLenum pname, const GLint* params)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glTexParameteriv(target, pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1075,7 +1075,7 @@ inline void QOpenGLFunctions::glTexParameteriv(GLenum target, GLenum pname, cons
inline void QOpenGLFunctions::glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1086,7 +1086,7 @@ inline void QOpenGLFunctions::glTexSubImage2D(GLenum target, GLint level, GLint
inline void QOpenGLFunctions::glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glViewport(x, y, width, height);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1099,7 +1099,7 @@ inline void QOpenGLFunctions::glViewport(GLint x, GLint y, GLsizei width, GLsize
inline void QOpenGLFunctions::glActiveTexture(GLenum texture)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glActiveTexture(texture);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1110,7 +1110,7 @@ inline void QOpenGLFunctions::glActiveTexture(GLenum texture)
inline void QOpenGLFunctions::glAttachShader(GLuint program, GLuint shader)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glAttachShader(program, shader);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1121,7 +1121,7 @@ inline void QOpenGLFunctions::glAttachShader(GLuint program, GLuint shader)
inline void QOpenGLFunctions::glBindAttribLocation(GLuint program, GLuint index, const char* name)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glBindAttribLocation(program, index, name);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1132,7 +1132,7 @@ inline void QOpenGLFunctions::glBindAttribLocation(GLuint program, GLuint index,
inline void QOpenGLFunctions::glBindBuffer(GLenum target, GLuint buffer)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glBindBuffer(target, buffer);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1145,7 +1145,7 @@ inline void QOpenGLFunctions::glBindFramebuffer(GLenum target, GLuint framebuffe
{
if (framebuffer == 0)
framebuffer = QOpenGLContext::currentContext()->defaultFramebufferObject();
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glBindFramebuffer(target, framebuffer);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1156,7 +1156,7 @@ inline void QOpenGLFunctions::glBindFramebuffer(GLenum target, GLuint framebuffe
inline void QOpenGLFunctions::glBindRenderbuffer(GLenum target, GLuint renderbuffer)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glBindRenderbuffer(target, renderbuffer);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1167,7 +1167,7 @@ inline void QOpenGLFunctions::glBindRenderbuffer(GLenum target, GLuint renderbuf
inline void QOpenGLFunctions::glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glBlendColor(red, green, blue, alpha);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1178,7 +1178,7 @@ inline void QOpenGLFunctions::glBlendColor(GLclampf red, GLclampf green, GLclamp
inline void QOpenGLFunctions::glBlendEquation(GLenum mode)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glBlendEquation(mode);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1189,7 +1189,7 @@ inline void QOpenGLFunctions::glBlendEquation(GLenum mode)
inline void QOpenGLFunctions::glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glBlendEquationSeparate(modeRGB, modeAlpha);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1200,7 +1200,7 @@ inline void QOpenGLFunctions::glBlendEquationSeparate(GLenum modeRGB, GLenum mod
inline void QOpenGLFunctions::glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glBlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1211,7 +1211,7 @@ inline void QOpenGLFunctions::glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB,
inline void QOpenGLFunctions::glBufferData(GLenum target, qopengl_GLsizeiptr size, const void* data, GLenum usage)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glBufferData(target, size, data, usage);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1222,7 +1222,7 @@ inline void QOpenGLFunctions::glBufferData(GLenum target, qopengl_GLsizeiptr siz
inline void QOpenGLFunctions::glBufferSubData(GLenum target, qopengl_GLintptr offset, qopengl_GLsizeiptr size, const void* data)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glBufferSubData(target, offset, size, data);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1233,7 +1233,7 @@ inline void QOpenGLFunctions::glBufferSubData(GLenum target, qopengl_GLintptr of
inline GLenum QOpenGLFunctions::glCheckFramebufferStatus(GLenum target)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
GLenum result = ::glCheckFramebufferStatus(target);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1245,7 +1245,7 @@ inline GLenum QOpenGLFunctions::glCheckFramebufferStatus(GLenum target)
inline void QOpenGLFunctions::glClearDepthf(GLclampf depth)
{
-#if defined(QT_OPENGL_ES) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glClearDepthf(depth);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1256,7 +1256,7 @@ inline void QOpenGLFunctions::glClearDepthf(GLclampf depth)
inline void QOpenGLFunctions::glCompileShader(GLuint shader)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glCompileShader(shader);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1267,7 +1267,7 @@ inline void QOpenGLFunctions::glCompileShader(GLuint shader)
inline void QOpenGLFunctions::glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const void* data)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1278,7 +1278,7 @@ inline void QOpenGLFunctions::glCompressedTexImage2D(GLenum target, GLint level,
inline void QOpenGLFunctions::glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void* data)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1289,7 +1289,7 @@ inline void QOpenGLFunctions::glCompressedTexSubImage2D(GLenum target, GLint lev
inline GLuint QOpenGLFunctions::glCreateProgram()
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
GLuint result = ::glCreateProgram();
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1301,7 +1301,7 @@ inline GLuint QOpenGLFunctions::glCreateProgram()
inline GLuint QOpenGLFunctions::glCreateShader(GLenum type)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
GLuint result = ::glCreateShader(type);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1313,7 +1313,7 @@ inline GLuint QOpenGLFunctions::glCreateShader(GLenum type)
inline void QOpenGLFunctions::glDeleteBuffers(GLsizei n, const GLuint* buffers)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glDeleteBuffers(n, buffers);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1324,7 +1324,7 @@ inline void QOpenGLFunctions::glDeleteBuffers(GLsizei n, const GLuint* buffers)
inline void QOpenGLFunctions::glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glDeleteFramebuffers(n, framebuffers);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1335,7 +1335,7 @@ inline void QOpenGLFunctions::glDeleteFramebuffers(GLsizei n, const GLuint* fram
inline void QOpenGLFunctions::glDeleteProgram(GLuint program)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glDeleteProgram(program);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1346,7 +1346,7 @@ inline void QOpenGLFunctions::glDeleteProgram(GLuint program)
inline void QOpenGLFunctions::glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glDeleteRenderbuffers(n, renderbuffers);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1357,7 +1357,7 @@ inline void QOpenGLFunctions::glDeleteRenderbuffers(GLsizei n, const GLuint* ren
inline void QOpenGLFunctions::glDeleteShader(GLuint shader)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glDeleteShader(shader);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1368,7 +1368,7 @@ inline void QOpenGLFunctions::glDeleteShader(GLuint shader)
inline void QOpenGLFunctions::glDepthRangef(GLclampf zNear, GLclampf zFar)
{
-#if defined(QT_OPENGL_ES) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glDepthRangef(zNear, zFar);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1379,7 +1379,7 @@ inline void QOpenGLFunctions::glDepthRangef(GLclampf zNear, GLclampf zFar)
inline void QOpenGLFunctions::glDetachShader(GLuint program, GLuint shader)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glDetachShader(program, shader);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1390,7 +1390,7 @@ inline void QOpenGLFunctions::glDetachShader(GLuint program, GLuint shader)
inline void QOpenGLFunctions::glDisableVertexAttribArray(GLuint index)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glDisableVertexAttribArray(index);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1401,7 +1401,7 @@ inline void QOpenGLFunctions::glDisableVertexAttribArray(GLuint index)
inline void QOpenGLFunctions::glEnableVertexAttribArray(GLuint index)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glEnableVertexAttribArray(index);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1412,7 +1412,7 @@ inline void QOpenGLFunctions::glEnableVertexAttribArray(GLuint index)
inline void QOpenGLFunctions::glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glFramebufferRenderbuffer(target, attachment, renderbuffertarget, renderbuffer);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1423,7 +1423,7 @@ inline void QOpenGLFunctions::glFramebufferRenderbuffer(GLenum target, GLenum at
inline void QOpenGLFunctions::glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glFramebufferTexture2D(target, attachment, textarget, texture, level);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1434,7 +1434,7 @@ inline void QOpenGLFunctions::glFramebufferTexture2D(GLenum target, GLenum attac
inline void QOpenGLFunctions::glGenBuffers(GLsizei n, GLuint* buffers)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGenBuffers(n, buffers);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1445,7 +1445,7 @@ inline void QOpenGLFunctions::glGenBuffers(GLsizei n, GLuint* buffers)
inline void QOpenGLFunctions::glGenerateMipmap(GLenum target)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGenerateMipmap(target);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1456,7 +1456,7 @@ inline void QOpenGLFunctions::glGenerateMipmap(GLenum target)
inline void QOpenGLFunctions::glGenFramebuffers(GLsizei n, GLuint* framebuffers)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGenFramebuffers(n, framebuffers);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1467,7 +1467,7 @@ inline void QOpenGLFunctions::glGenFramebuffers(GLsizei n, GLuint* framebuffers)
inline void QOpenGLFunctions::glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGenRenderbuffers(n, renderbuffers);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1478,7 +1478,7 @@ inline void QOpenGLFunctions::glGenRenderbuffers(GLsizei n, GLuint* renderbuffer
inline void QOpenGLFunctions::glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetActiveAttrib(program, index, bufsize, length, size, type, name);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1489,7 +1489,7 @@ inline void QOpenGLFunctions::glGetActiveAttrib(GLuint program, GLuint index, GL
inline void QOpenGLFunctions::glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, char* name)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetActiveUniform(program, index, bufsize, length, size, type, name);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1500,7 +1500,7 @@ inline void QOpenGLFunctions::glGetActiveUniform(GLuint program, GLuint index, G
inline void QOpenGLFunctions::glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetAttachedShaders(program, maxcount, count, shaders);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1511,7 +1511,7 @@ inline void QOpenGLFunctions::glGetAttachedShaders(GLuint program, GLsizei maxco
inline GLint QOpenGLFunctions::glGetAttribLocation(GLuint program, const char* name)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
GLint result = ::glGetAttribLocation(program, name);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1523,7 +1523,7 @@ inline GLint QOpenGLFunctions::glGetAttribLocation(GLuint program, const char* n
inline void QOpenGLFunctions::glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetBufferParameteriv(target, pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1534,7 +1534,7 @@ inline void QOpenGLFunctions::glGetBufferParameteriv(GLenum target, GLenum pname
inline void QOpenGLFunctions::glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetFramebufferAttachmentParameteriv(target, attachment, pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1545,7 +1545,7 @@ inline void QOpenGLFunctions::glGetFramebufferAttachmentParameteriv(GLenum targe
inline void QOpenGLFunctions::glGetProgramiv(GLuint program, GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetProgramiv(program, pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1556,7 +1556,7 @@ inline void QOpenGLFunctions::glGetProgramiv(GLuint program, GLenum pname, GLint
inline void QOpenGLFunctions::glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, char* infolog)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetProgramInfoLog(program, bufsize, length, infolog);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1567,7 +1567,7 @@ inline void QOpenGLFunctions::glGetProgramInfoLog(GLuint program, GLsizei bufsiz
inline void QOpenGLFunctions::glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetRenderbufferParameteriv(target, pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1578,7 +1578,7 @@ inline void QOpenGLFunctions::glGetRenderbufferParameteriv(GLenum target, GLenum
inline void QOpenGLFunctions::glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetShaderiv(shader, pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1589,7 +1589,7 @@ inline void QOpenGLFunctions::glGetShaderiv(GLuint shader, GLenum pname, GLint*
inline void QOpenGLFunctions::glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, char* infolog)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetShaderInfoLog(shader, bufsize, length, infolog);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1600,7 +1600,7 @@ inline void QOpenGLFunctions::glGetShaderInfoLog(GLuint shader, GLsizei bufsize,
inline void QOpenGLFunctions::glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetShaderPrecisionFormat(shadertype, precisiontype, range, precision);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1611,7 +1611,7 @@ inline void QOpenGLFunctions::glGetShaderPrecisionFormat(GLenum shadertype, GLen
inline void QOpenGLFunctions::glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, char* source)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetShaderSource(shader, bufsize, length, source);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1622,7 +1622,7 @@ inline void QOpenGLFunctions::glGetShaderSource(GLuint shader, GLsizei bufsize,
inline void QOpenGLFunctions::glGetUniformfv(GLuint program, GLint location, GLfloat* params)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetUniformfv(program, location, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1633,7 +1633,7 @@ inline void QOpenGLFunctions::glGetUniformfv(GLuint program, GLint location, GLf
inline void QOpenGLFunctions::glGetUniformiv(GLuint program, GLint location, GLint* params)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetUniformiv(program, location, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1644,7 +1644,7 @@ inline void QOpenGLFunctions::glGetUniformiv(GLuint program, GLint location, GLi
inline GLint QOpenGLFunctions::glGetUniformLocation(GLuint program, const char* name)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
GLint result = ::glGetUniformLocation(program, name);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1656,7 +1656,7 @@ inline GLint QOpenGLFunctions::glGetUniformLocation(GLuint program, const char*
inline void QOpenGLFunctions::glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetVertexAttribfv(index, pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1667,7 +1667,7 @@ inline void QOpenGLFunctions::glGetVertexAttribfv(GLuint index, GLenum pname, GL
inline void QOpenGLFunctions::glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetVertexAttribiv(index, pname, params);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1678,7 +1678,7 @@ inline void QOpenGLFunctions::glGetVertexAttribiv(GLuint index, GLenum pname, GL
inline void QOpenGLFunctions::glGetVertexAttribPointerv(GLuint index, GLenum pname, void** pointer)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glGetVertexAttribPointerv(index, pname, pointer);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1689,7 +1689,7 @@ inline void QOpenGLFunctions::glGetVertexAttribPointerv(GLuint index, GLenum pna
inline GLboolean QOpenGLFunctions::glIsBuffer(GLuint buffer)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
GLboolean result = ::glIsBuffer(buffer);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1701,7 +1701,7 @@ inline GLboolean QOpenGLFunctions::glIsBuffer(GLuint buffer)
inline GLboolean QOpenGLFunctions::glIsFramebuffer(GLuint framebuffer)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
GLboolean result = ::glIsFramebuffer(framebuffer);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1713,7 +1713,7 @@ inline GLboolean QOpenGLFunctions::glIsFramebuffer(GLuint framebuffer)
inline GLboolean QOpenGLFunctions::glIsProgram(GLuint program)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
GLboolean result = ::glIsProgram(program);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1725,7 +1725,7 @@ inline GLboolean QOpenGLFunctions::glIsProgram(GLuint program)
inline GLboolean QOpenGLFunctions::glIsRenderbuffer(GLuint renderbuffer)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
GLboolean result = ::glIsRenderbuffer(renderbuffer);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1737,7 +1737,7 @@ inline GLboolean QOpenGLFunctions::glIsRenderbuffer(GLuint renderbuffer)
inline GLboolean QOpenGLFunctions::glIsShader(GLuint shader)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
GLboolean result = ::glIsShader(shader);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1749,7 +1749,7 @@ inline GLboolean QOpenGLFunctions::glIsShader(GLuint shader)
inline void QOpenGLFunctions::glLinkProgram(GLuint program)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glLinkProgram(program);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1760,7 +1760,7 @@ inline void QOpenGLFunctions::glLinkProgram(GLuint program)
inline void QOpenGLFunctions::glReleaseShaderCompiler()
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glReleaseShaderCompiler();
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1771,7 +1771,7 @@ inline void QOpenGLFunctions::glReleaseShaderCompiler()
inline void QOpenGLFunctions::glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glRenderbufferStorage(target, internalformat, width, height);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1782,7 +1782,7 @@ inline void QOpenGLFunctions::glRenderbufferStorage(GLenum target, GLenum intern
inline void QOpenGLFunctions::glSampleCoverage(GLclampf value, GLboolean invert)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glSampleCoverage(value, invert);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1793,7 +1793,7 @@ inline void QOpenGLFunctions::glSampleCoverage(GLclampf value, GLboolean invert)
inline void QOpenGLFunctions::glShaderBinary(GLint n, const GLuint* shaders, GLenum binaryformat, const void* binary, GLint length)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glShaderBinary(n, shaders, binaryformat, binary, length);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1804,7 +1804,7 @@ inline void QOpenGLFunctions::glShaderBinary(GLint n, const GLuint* shaders, GLe
inline void QOpenGLFunctions::glShaderSource(GLuint shader, GLsizei count, const char** string, const GLint* length)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glShaderSource(shader, count, string, length);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1815,7 +1815,7 @@ inline void QOpenGLFunctions::glShaderSource(GLuint shader, GLsizei count, const
inline void QOpenGLFunctions::glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glStencilFuncSeparate(face, func, ref, mask);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1826,7 +1826,7 @@ inline void QOpenGLFunctions::glStencilFuncSeparate(GLenum face, GLenum func, GL
inline void QOpenGLFunctions::glStencilMaskSeparate(GLenum face, GLuint mask)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glStencilMaskSeparate(face, mask);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1837,7 +1837,7 @@ inline void QOpenGLFunctions::glStencilMaskSeparate(GLenum face, GLuint mask)
inline void QOpenGLFunctions::glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glStencilOpSeparate(face, fail, zfail, zpass);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1848,7 +1848,7 @@ inline void QOpenGLFunctions::glStencilOpSeparate(GLenum face, GLenum fail, GLen
inline void QOpenGLFunctions::glUniform1f(GLint location, GLfloat x)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUniform1f(location, x);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1859,7 +1859,7 @@ inline void QOpenGLFunctions::glUniform1f(GLint location, GLfloat x)
inline void QOpenGLFunctions::glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUniform1fv(location, count, v);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1870,7 +1870,7 @@ inline void QOpenGLFunctions::glUniform1fv(GLint location, GLsizei count, const
inline void QOpenGLFunctions::glUniform1i(GLint location, GLint x)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUniform1i(location, x);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1881,7 +1881,7 @@ inline void QOpenGLFunctions::glUniform1i(GLint location, GLint x)
inline void QOpenGLFunctions::glUniform1iv(GLint location, GLsizei count, const GLint* v)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUniform1iv(location, count, v);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1892,7 +1892,7 @@ inline void QOpenGLFunctions::glUniform1iv(GLint location, GLsizei count, const
inline void QOpenGLFunctions::glUniform2f(GLint location, GLfloat x, GLfloat y)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUniform2f(location, x, y);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1903,7 +1903,7 @@ inline void QOpenGLFunctions::glUniform2f(GLint location, GLfloat x, GLfloat y)
inline void QOpenGLFunctions::glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUniform2fv(location, count, v);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1914,7 +1914,7 @@ inline void QOpenGLFunctions::glUniform2fv(GLint location, GLsizei count, const
inline void QOpenGLFunctions::glUniform2i(GLint location, GLint x, GLint y)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUniform2i(location, x, y);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1925,7 +1925,7 @@ inline void QOpenGLFunctions::glUniform2i(GLint location, GLint x, GLint y)
inline void QOpenGLFunctions::glUniform2iv(GLint location, GLsizei count, const GLint* v)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUniform2iv(location, count, v);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1936,7 +1936,7 @@ inline void QOpenGLFunctions::glUniform2iv(GLint location, GLsizei count, const
inline void QOpenGLFunctions::glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUniform3f(location, x, y, z);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1947,7 +1947,7 @@ inline void QOpenGLFunctions::glUniform3f(GLint location, GLfloat x, GLfloat y,
inline void QOpenGLFunctions::glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUniform3fv(location, count, v);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1958,7 +1958,7 @@ inline void QOpenGLFunctions::glUniform3fv(GLint location, GLsizei count, const
inline void QOpenGLFunctions::glUniform3i(GLint location, GLint x, GLint y, GLint z)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUniform3i(location, x, y, z);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1969,7 +1969,7 @@ inline void QOpenGLFunctions::glUniform3i(GLint location, GLint x, GLint y, GLin
inline void QOpenGLFunctions::glUniform3iv(GLint location, GLsizei count, const GLint* v)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUniform3iv(location, count, v);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1980,7 +1980,7 @@ inline void QOpenGLFunctions::glUniform3iv(GLint location, GLsizei count, const
inline void QOpenGLFunctions::glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUniform4f(location, x, y, z, w);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -1991,7 +1991,7 @@ inline void QOpenGLFunctions::glUniform4f(GLint location, GLfloat x, GLfloat y,
inline void QOpenGLFunctions::glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUniform4fv(location, count, v);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -2002,7 +2002,7 @@ inline void QOpenGLFunctions::glUniform4fv(GLint location, GLsizei count, const
inline void QOpenGLFunctions::glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUniform4i(location, x, y, z, w);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -2013,7 +2013,7 @@ inline void QOpenGLFunctions::glUniform4i(GLint location, GLint x, GLint y, GLin
inline void QOpenGLFunctions::glUniform4iv(GLint location, GLsizei count, const GLint* v)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUniform4iv(location, count, v);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -2024,7 +2024,7 @@ inline void QOpenGLFunctions::glUniform4iv(GLint location, GLsizei count, const
inline void QOpenGLFunctions::glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUniformMatrix2fv(location, count, transpose, value);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -2035,7 +2035,7 @@ inline void QOpenGLFunctions::glUniformMatrix2fv(GLint location, GLsizei count,
inline void QOpenGLFunctions::glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUniformMatrix3fv(location, count, transpose, value);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -2046,7 +2046,7 @@ inline void QOpenGLFunctions::glUniformMatrix3fv(GLint location, GLsizei count,
inline void QOpenGLFunctions::glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUniformMatrix4fv(location, count, transpose, value);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -2057,7 +2057,7 @@ inline void QOpenGLFunctions::glUniformMatrix4fv(GLint location, GLsizei count,
inline void QOpenGLFunctions::glUseProgram(GLuint program)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glUseProgram(program);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -2068,7 +2068,7 @@ inline void QOpenGLFunctions::glUseProgram(GLuint program)
inline void QOpenGLFunctions::glValidateProgram(GLuint program)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glValidateProgram(program);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -2079,7 +2079,7 @@ inline void QOpenGLFunctions::glValidateProgram(GLuint program)
inline void QOpenGLFunctions::glVertexAttrib1f(GLuint indx, GLfloat x)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glVertexAttrib1f(indx, x);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -2090,7 +2090,7 @@ inline void QOpenGLFunctions::glVertexAttrib1f(GLuint indx, GLfloat x)
inline void QOpenGLFunctions::glVertexAttrib1fv(GLuint indx, const GLfloat* values)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glVertexAttrib1fv(indx, values);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -2101,7 +2101,7 @@ inline void QOpenGLFunctions::glVertexAttrib1fv(GLuint indx, const GLfloat* valu
inline void QOpenGLFunctions::glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glVertexAttrib2f(indx, x, y);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -2112,7 +2112,7 @@ inline void QOpenGLFunctions::glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y
inline void QOpenGLFunctions::glVertexAttrib2fv(GLuint indx, const GLfloat* values)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glVertexAttrib2fv(indx, values);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -2123,7 +2123,7 @@ inline void QOpenGLFunctions::glVertexAttrib2fv(GLuint indx, const GLfloat* valu
inline void QOpenGLFunctions::glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glVertexAttrib3f(indx, x, y, z);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -2134,7 +2134,7 @@ inline void QOpenGLFunctions::glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y
inline void QOpenGLFunctions::glVertexAttrib3fv(GLuint indx, const GLfloat* values)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glVertexAttrib3fv(indx, values);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -2145,7 +2145,7 @@ inline void QOpenGLFunctions::glVertexAttrib3fv(GLuint indx, const GLfloat* valu
inline void QOpenGLFunctions::glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glVertexAttrib4f(indx, x, y, z, w);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -2156,7 +2156,7 @@ inline void QOpenGLFunctions::glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y
inline void QOpenGLFunctions::glVertexAttrib4fv(GLuint indx, const GLfloat* values)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glVertexAttrib4fv(indx, values);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
@@ -2167,7 +2167,7 @@ inline void QOpenGLFunctions::glVertexAttrib4fv(GLuint indx, const GLfloat* valu
inline void QOpenGLFunctions::glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const void* ptr)
{
-#if defined(QT_OPENGL_ES_2) && defined(Q_OS_ANDROID)
+#if QT_CONFIG(opengles2) && defined(Q_OS_ANDROID)
::glVertexAttribPointer(indx, size, type, normalized, stride, ptr);
#else
Q_ASSERT(QOpenGLFunctions::isInitialized(d_ptr));
diff --git a/src/gui/opengl/qopenglprogrambinarycache.cpp b/src/gui/opengl/qopenglprogrambinarycache.cpp
index 89c44e72c0..631c3d151b 100644
--- a/src/gui/opengl/qopenglprogrambinarycache.cpp
+++ b/src/gui/opengl/qopenglprogrambinarycache.cpp
@@ -190,7 +190,7 @@ bool QOpenGLProgramBinaryCache::setProgramBinary(uint programId, uint blobFormat
if (error == GL_NO_ERROR || error == GL_CONTEXT_LOST)
break;
}
-#if defined(QT_OPENGL_ES_2)
+#if QT_CONFIG(opengles2)
if (context->isOpenGLES() && context->format().majorVersion() < 3) {
initializeProgramBinaryOES(context);
programBinaryOES(programId, blobFormat, p, blobSize);
@@ -412,7 +412,7 @@ void QOpenGLProgramBinaryCache::save(const QByteArray &cacheKey, uint programId)
*p++ = 0;
GLint outSize = 0;
-#if defined(QT_OPENGL_ES_2)
+#if QT_CONFIG(opengles2)
if (context->isOpenGLES() && context->format().majorVersion() < 3) {
QMutexLocker lock(&m_mutex);
initializeProgramBinaryOES(context);
@@ -443,7 +443,7 @@ void QOpenGLProgramBinaryCache::save(const QByteArray &cacheKey, uint programId)
}
}
-#if defined(QT_OPENGL_ES_2)
+#if QT_CONFIG(opengles2)
void QOpenGLProgramBinaryCache::initializeProgramBinaryOES(QOpenGLContext *context)
{
if (m_programBinaryOESInitialized)
diff --git a/src/gui/opengl/qopenglprogrambinarycache_p.h b/src/gui/opengl/qopenglprogrambinarycache_p.h
index 873e9d7c00..1642d6efab 100644
--- a/src/gui/opengl/qopenglprogrambinarycache_p.h
+++ b/src/gui/opengl/qopenglprogrambinarycache_p.h
@@ -103,7 +103,7 @@ private:
uint format;
};
QCache<QByteArray, MemCacheEntry> m_memCache;
-#if defined(QT_OPENGL_ES_2)
+#if QT_CONFIG(opengles2)
void (QOPENGLF_APIENTRYP programBinaryOES)(GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length);
void (QOPENGLF_APIENTRYP getProgramBinaryOES)(GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
void initializeProgramBinaryOES(QOpenGLContext *context);
diff --git a/src/opengl/qopenglbuffer.cpp b/src/opengl/qopenglbuffer.cpp
index 3f049e5e89..8a880662b1 100644
--- a/src/opengl/qopenglbuffer.cpp
+++ b/src/opengl/qopenglbuffer.cpp
@@ -341,7 +341,7 @@ void QOpenGLBuffer::destroy()
*/
bool QOpenGLBuffer::read(int offset, void *data, int count)
{
-#if !defined(QT_OPENGL_ES)
+#if !QT_CONFIG(opengles2)
Q_D(QOpenGLBuffer);
if (!d->funcs->hasOpenGLFeature(QOpenGLFunctions::Buffers) || !d->guard->id())
return false;
diff --git a/src/opengl/qopenglframebufferobject.cpp b/src/opengl/qopenglframebufferobject.cpp
index d39f5b5b75..ba18647387 100644
--- a/src/opengl/qopenglframebufferobject.cpp
+++ b/src/opengl/qopenglframebufferobject.cpp
@@ -748,7 +748,7 @@ void QOpenGLFramebufferObjectPrivate::initDepthStencilAttachments(QOpenGLContext
funcs.glBindRenderbuffer(GL_RENDERBUFFER, stencil_buffer);
Q_ASSERT(funcs.glIsRenderbuffer(stencil_buffer));
-#ifdef QT_OPENGL_ES
+#if QT_CONFIG(opengles2)
GLenum storage = GL_STENCIL_INDEX8;
#else
GLenum storage = ctx->isOpenGLES() ? GL_STENCIL_INDEX8 : GL_STENCIL_INDEX;
@@ -875,7 +875,7 @@ void QOpenGLFramebufferObjectPrivate::initDepthStencilAttachments(QOpenGLContext
static inline GLenum effectiveInternalFormat(GLenum internalFormat)
{
if (!internalFormat)
-#ifdef QT_OPENGL_ES_2
+#if QT_CONFIG(opengles2)
internalFormat = GL_RGBA;
#else
internalFormat = QOpenGLContext::currentContext()->isOpenGLES() ? GL_RGBA : GL_RGBA8;
diff --git a/src/opengl/qopenglframebufferobject_p.h b/src/opengl/qopenglframebufferobject_p.h
index df87734a58..3721e2affa 100644
--- a/src/opengl/qopenglframebufferobject_p.h
+++ b/src/opengl/qopenglframebufferobject_p.h
@@ -67,7 +67,7 @@ public:
target(GL_TEXTURE_2D),
mipmap(false)
{
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
// There is nothing that says QOpenGLFramebufferObjectFormat needs a current
// context, so we need a fallback just to be safe, even though in pratice there
// will usually be a context current.
diff --git a/src/opengl/qopenglfunctions_1_0.h b/src/opengl/qopenglfunctions_1_0.h
index cd94512614..4d0b325eb4 100644
--- a/src/opengl/qopenglfunctions_1_0.h
+++ b/src/opengl/qopenglfunctions_1_0.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -1925,6 +1925,6 @@ inline void QOpenGLFunctions_1_0::glNewList(GLuint list, GLenum mode)
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_1_1.h b/src/opengl/qopenglfunctions_1_1.h
index f24150fae7..b948b55fe6 100644
--- a/src/opengl/qopenglfunctions_1_1.h
+++ b/src/opengl/qopenglfunctions_1_1.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -2115,6 +2115,6 @@ inline void QOpenGLFunctions_1_1::glArrayElement(GLint i)
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_1_2.h b/src/opengl/qopenglfunctions_1_2.h
index 623b2b89d5..3b3886e934 100644
--- a/src/opengl/qopenglfunctions_1_2.h
+++ b/src/opengl/qopenglfunctions_1_2.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -2354,6 +2354,6 @@ inline void QOpenGLFunctions_1_2::glColorTable(GLenum target, GLenum internalfor
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_1_3.h b/src/opengl/qopenglfunctions_1_3.h
index 6c7ef74323..1a004c0c16 100644
--- a/src/opengl/qopenglfunctions_1_3.h
+++ b/src/opengl/qopenglfunctions_1_3.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -2639,6 +2639,6 @@ inline void QOpenGLFunctions_1_3::glClientActiveTexture(GLenum texture)
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_1_4.h b/src/opengl/qopenglfunctions_1_4.h
index d59b283c17..af814bc047 100644
--- a/src/opengl/qopenglfunctions_1_4.h
+++ b/src/opengl/qopenglfunctions_1_4.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -2919,6 +2919,6 @@ inline void QOpenGLFunctions_1_4::glFogCoordf(GLfloat coord)
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_1_5.h b/src/opengl/qopenglfunctions_1_5.h
index 9600632e9d..857c6d156b 100644
--- a/src/opengl/qopenglfunctions_1_5.h
+++ b/src/opengl/qopenglfunctions_1_5.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -3042,6 +3042,6 @@ inline void QOpenGLFunctions_1_5::glFogCoordf(GLfloat coord)
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_2_0.h b/src/opengl/qopenglfunctions_2_0.h
index 7b5e580d3d..abe4ade56a 100644
--- a/src/opengl/qopenglfunctions_2_0.h
+++ b/src/opengl/qopenglfunctions_2_0.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -3610,6 +3610,6 @@ inline void QOpenGLFunctions_2_0::glVertexAttrib1d(GLuint index, GLdouble x)
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_2_1.h b/src/opengl/qopenglfunctions_2_1.h
index 323ba1e03d..dc46d8a4b2 100644
--- a/src/opengl/qopenglfunctions_2_1.h
+++ b/src/opengl/qopenglfunctions_2_1.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -3655,6 +3655,6 @@ inline void QOpenGLFunctions_2_1::glVertexAttrib1d(GLuint index, GLdouble x)
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_3_0.h b/src/opengl/qopenglfunctions_3_0.h
index ffc9121472..cce2b32c81 100644
--- a/src/opengl/qopenglfunctions_3_0.h
+++ b/src/opengl/qopenglfunctions_3_0.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -4169,6 +4169,6 @@ inline void QOpenGLFunctions_3_0::glVertexAttribI1i(GLuint index, GLint x)
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_3_1.h b/src/opengl/qopenglfunctions_3_1.h
index 8bc4f69e32..cee5685a86 100644
--- a/src/opengl/qopenglfunctions_3_1.h
+++ b/src/opengl/qopenglfunctions_3_1.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -1597,6 +1597,6 @@ inline void QOpenGLFunctions_3_1::glDrawArraysInstanced(GLenum mode, GLint first
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_3_2_compatibility.h b/src/opengl/qopenglfunctions_3_2_compatibility.h
index f4ce56f27d..413b106b44 100644
--- a/src/opengl/qopenglfunctions_3_2_compatibility.h
+++ b/src/opengl/qopenglfunctions_3_2_compatibility.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -4373,6 +4373,6 @@ inline void QOpenGLFunctions_3_2_Compatibility::glVertexAttribI1i(GLuint index,
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_3_2_core.h b/src/opengl/qopenglfunctions_3_2_core.h
index 4fad8f5e59..bcc07eeca1 100644
--- a/src/opengl/qopenglfunctions_3_2_core.h
+++ b/src/opengl/qopenglfunctions_3_2_core.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -1716,6 +1716,6 @@ inline void QOpenGLFunctions_3_2_Core::glGetInteger64i_v(GLenum target, GLuint i
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_3_3_compatibility.h b/src/opengl/qopenglfunctions_3_3_compatibility.h
index 971f4a58f4..ee8884d6b0 100644
--- a/src/opengl/qopenglfunctions_3_3_compatibility.h
+++ b/src/opengl/qopenglfunctions_3_3_compatibility.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -4730,6 +4730,6 @@ inline void QOpenGLFunctions_3_3_Compatibility::glVertexAttribI1i(GLuint index,
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_3_3_core.h b/src/opengl/qopenglfunctions_3_3_core.h
index 6f80adfe20..b38f9c54e5 100644
--- a/src/opengl/qopenglfunctions_3_3_core.h
+++ b/src/opengl/qopenglfunctions_3_3_core.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -2137,6 +2137,6 @@ inline void QOpenGLFunctions_3_3_Core::glVertexAttribDivisor(GLuint index, GLuin
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_4_0_compatibility.h b/src/opengl/qopenglfunctions_4_0_compatibility.h
index c8900ab599..8b6027e0fc 100644
--- a/src/opengl/qopenglfunctions_4_0_compatibility.h
+++ b/src/opengl/qopenglfunctions_4_0_compatibility.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -5015,6 +5015,6 @@ inline void QOpenGLFunctions_4_0_Compatibility::glVertexAttribI1i(GLuint index,
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_4_0_core.h b/src/opengl/qopenglfunctions_4_0_core.h
index aac7880592..8553bada6e 100644
--- a/src/opengl/qopenglfunctions_4_0_core.h
+++ b/src/opengl/qopenglfunctions_4_0_core.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -2418,6 +2418,6 @@ inline void QOpenGLFunctions_4_0_Core::glMinSampleShading(GLfloat value)
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_4_1_compatibility.h b/src/opengl/qopenglfunctions_4_1_compatibility.h
index e54f103151..72d122e1f2 100644
--- a/src/opengl/qopenglfunctions_4_1_compatibility.h
+++ b/src/opengl/qopenglfunctions_4_1_compatibility.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -5552,6 +5552,6 @@ inline void QOpenGLFunctions_4_1_Compatibility::glVertexAttribI1i(GLuint index,
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_4_1_core.h b/src/opengl/qopenglfunctions_4_1_core.h
index 6a18d42479..8c2f5bce3e 100644
--- a/src/opengl/qopenglfunctions_4_1_core.h
+++ b/src/opengl/qopenglfunctions_4_1_core.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -2951,6 +2951,6 @@ inline void QOpenGLFunctions_4_1_Core::glReleaseShaderCompiler()
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_4_2_compatibility.h b/src/opengl/qopenglfunctions_4_2_compatibility.h
index 08dd30864b..6fca54752d 100644
--- a/src/opengl/qopenglfunctions_4_2_compatibility.h
+++ b/src/opengl/qopenglfunctions_4_2_compatibility.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -5643,6 +5643,6 @@ QT_END_NAMESPACE
#pragma pop_macro("MemoryBarrier")
#endif
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_4_2_core.h b/src/opengl/qopenglfunctions_4_2_core.h
index 5eff9f449c..88e19fe1bc 100644
--- a/src/opengl/qopenglfunctions_4_2_core.h
+++ b/src/opengl/qopenglfunctions_4_2_core.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -3038,6 +3038,6 @@ QT_END_NAMESPACE
#pragma pop_macro("MemoryBarrier")
#endif
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_4_3_compatibility.h b/src/opengl/qopenglfunctions_4_3_compatibility.h
index dc8eb32842..bff937d86a 100644
--- a/src/opengl/qopenglfunctions_4_3_compatibility.h
+++ b/src/opengl/qopenglfunctions_4_3_compatibility.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -5850,6 +5850,6 @@ QT_END_NAMESPACE
#pragma pop_macro("MemoryBarrier")
#endif
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_4_3_core.h b/src/opengl/qopenglfunctions_4_3_core.h
index 4bbcb4fc46..31903bdcf4 100644
--- a/src/opengl/qopenglfunctions_4_3_core.h
+++ b/src/opengl/qopenglfunctions_4_3_core.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -3242,6 +3242,6 @@ QT_END_NAMESPACE
#pragma pop_macro("MemoryBarrier")
#endif
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_4_4_compatibility.h b/src/opengl/qopenglfunctions_4_4_compatibility.h
index 6e5772ba4c..af23197dfa 100644
--- a/src/opengl/qopenglfunctions_4_4_compatibility.h
+++ b/src/opengl/qopenglfunctions_4_4_compatibility.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -5972,6 +5972,6 @@ QT_END_NAMESPACE
#pragma pop_macro("MemoryBarrier")
#endif
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_4_4_core.h b/src/opengl/qopenglfunctions_4_4_core.h
index 85229bff60..2b7cb71dfc 100644
--- a/src/opengl/qopenglfunctions_4_4_core.h
+++ b/src/opengl/qopenglfunctions_4_4_core.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -3426,6 +3426,6 @@ QT_END_NAMESPACE
#pragma pop_macro("MemoryBarrier")
#endif
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_4_5_compatibility.h b/src/opengl/qopenglfunctions_4_5_compatibility.h
index 766fe9105e..620ee6862e 100644
--- a/src/opengl/qopenglfunctions_4_5_compatibility.h
+++ b/src/opengl/qopenglfunctions_4_5_compatibility.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -6690,6 +6690,6 @@ QT_END_NAMESPACE
#pragma pop_macro("MemoryBarrier")
#endif
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_4_5_core.h b/src/opengl/qopenglfunctions_4_5_core.h
index 3fe64d2d25..fe0c0f1917 100644
--- a/src/opengl/qopenglfunctions_4_5_core.h
+++ b/src/opengl/qopenglfunctions_4_5_core.h
@@ -52,7 +52,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -4068,6 +4068,6 @@ QT_END_NAMESPACE
#endif
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglfunctions_es2.h b/src/opengl/qopenglfunctions_es2.h
index e3c4ad5c2c..e9837bae29 100644
--- a/src/opengl/qopenglfunctions_es2.h
+++ b/src/opengl/qopenglfunctions_es2.h
@@ -42,7 +42,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if defined(QT_OPENGL_ES_2) || defined(Q_QDOC)
+#if QT_CONFIG(opengles2) || defined(Q_QDOC)
#include <QtOpenGL/QOpenGLVersionProfile>
#include <QtOpenGL/QOpenGLVersionFunctions>
@@ -927,6 +927,6 @@ inline void QOpenGLFunctions_ES2::glViewport(GLint x, GLint y, GLsizei width, GL
QT_END_NAMESPACE
-#endif // QT_OPENGL_ES_2
+#endif // QT_CONFIG(opengles2)
#endif
diff --git a/src/opengl/qopenglpaintengine.cpp b/src/opengl/qopenglpaintengine.cpp
index 4168067e8f..66974aff79 100644
--- a/src/opengl/qopenglpaintengine.cpp
+++ b/src/opengl/qopenglpaintengine.cpp
@@ -682,7 +682,7 @@ void QOpenGL2PaintEngineEx::beginNativePainting()
for (int i = 0; i < QT_GL_VERTEX_ARRAY_TRACKED_COUNT; ++i)
d->funcs.glDisableVertexAttribArray(i);
-#if !defined(QT_OPENGL_ES_2) && !defined(QT_OPENGL_DYNAMIC)
+#if !QT_CONFIG(opengles2) && !defined(QT_OPENGL_DYNAMIC)
Q_ASSERT(QOpenGLContext::currentContext());
const QOpenGLContext *ctx = d->ctx;
const QSurfaceFormat &fmt = d->device->context()->format();
@@ -712,7 +712,7 @@ void QOpenGL2PaintEngineEx::beginNativePainting()
glMatrixMode(GL_MODELVIEW);
glLoadMatrixf(&mv_matrix[0][0]);
}
-#endif // QT_OPENGL_ES_2
+#endif // !QT_CONFIG(opengles2)
d->resetGLState();
@@ -1472,7 +1472,7 @@ void QOpenGL2PaintEngineEx::renderHintsChanged()
{
state()->renderHintsChanged = true;
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
Q_D(QOpenGL2PaintEngineEx);
QT_WARNING_PUSH
@@ -1487,7 +1487,7 @@ QT_WARNING_DISABLE_DEPRECATED
d->funcs.glDisable(GL_MULTISAMPLE);
QT_WARNING_POP
}
-#endif // QT_OPENGL_ES_2
+#endif // !QT_CONFIG(opengles2)
Q_D(QOpenGL2PaintEngineEx);
@@ -2248,13 +2248,13 @@ bool QOpenGL2PaintEngineEx::begin(QPaintDevice *pdev)
d->glyphCacheFormat = QFontEngine::Format_A8;
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
d->funcs.glDisable(GL_MULTISAMPLE);
d->glyphCacheFormat = QFontEngine::Format_A32;
d->multisamplingAlwaysEnabled = false;
} else
-#endif // QT_OPENGL_ES_2
+#endif // !QT_CONFIG(opengles2)
{
// OpenGL ES can't switch MSAA off, so if the gl paint device is
// multisampled, it's always multisampled.
diff --git a/src/opengl/qopenglqueryhelper_p.h b/src/opengl/qopenglqueryhelper_p.h
index f3ed997f98..40fe4cd89d 100644
--- a/src/opengl/qopenglqueryhelper_p.h
+++ b/src/opengl/qopenglqueryhelper_p.h
@@ -53,7 +53,7 @@
#include <QtGui/private/qtguiglobal_p.h>
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
#include <QtGui/QOpenGLContext>
diff --git a/src/opengl/qopenglshaderprogram.cpp b/src/opengl/qopenglshaderprogram.cpp
index 72ddea3a9e..968163fd4d 100644
--- a/src/opengl/qopenglshaderprogram.cpp
+++ b/src/opengl/qopenglshaderprogram.cpp
@@ -52,7 +52,7 @@
#include <QtGui/QColor>
#include <QtGui/QSurfaceFormat>
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
#include <QtOpenGL/qopenglfunctions_4_0_core.h>
#endif
@@ -207,7 +207,7 @@ QT_BEGIN_NAMESPACE
#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73
#endif
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
static inline bool isFormatGLES(const QSurfaceFormat &f)
{
return (f.renderableType() == QSurfaceFormat::OpenGLES);
@@ -221,7 +221,7 @@ static inline bool supportsGeometry(const QSurfaceFormat &f)
static inline bool supportsCompute(const QSurfaceFormat &f)
{
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
if (!isFormatGLES(f))
return f.version() >= qMakePair(4, 3);
else
@@ -233,7 +233,7 @@ static inline bool supportsCompute(const QSurfaceFormat &f)
static inline bool supportsTessellation(const QSurfaceFormat &f)
{
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
if (!isFormatGLES(f))
return f.version() >= qMakePair(4, 0);
else
@@ -470,7 +470,7 @@ static const char qualifierDefines[] =
"#define mediump\n"
"#define highp\n";
-#if defined(QT_OPENGL_ES) && !defined(QT_OPENGL_FORCE_SHADER_DEFINES)
+#if QT_CONFIG(opengles2) && !defined(QT_OPENGL_FORCE_SHADER_DEFINES)
// The "highp" qualifier doesn't exist in fragment shaders
// on all ES platforms. When it doesn't exist, use "mediump".
#define QOpenGL_REDEFINE_HIGHP 1
@@ -787,7 +787,7 @@ public:
, inited(false)
, removingShaders(false)
, glfuncs(new QOpenGLExtraFunctions)
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
, tessellationFuncs(nullptr)
#endif
, linkBinaryRecursion(false)
@@ -805,7 +805,7 @@ public:
QList<QOpenGLShader *> anonShaders;
QOpenGLExtraFunctions *glfuncs;
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
// for tessellation features not in GLES 3.2
QOpenGLFunctions_4_0_Core *tessellationFuncs;
#endif
@@ -895,7 +895,7 @@ bool QOpenGLShaderProgram::init()
return false;
d->glfuncs->initializeOpenGLFunctions();
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
if (!context->isOpenGLES() && context->format().version() >= qMakePair(4, 0)) {
d->tessellationFuncs = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_4_0_Core>(context);
d->tessellationFuncs->initializeOpenGLFunctions();
@@ -3568,7 +3568,7 @@ int QOpenGLShaderProgram::patchVertexCount() const
*/
void QOpenGLShaderProgram::setDefaultOuterTessellationLevels(const QVector<float> &levels)
{
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
Q_D(QOpenGLShaderProgram);
if (d->tessellationFuncs) {
QVector<float> tessLevels = levels;
@@ -3608,7 +3608,7 @@ void QOpenGLShaderProgram::setDefaultOuterTessellationLevels(const QVector<float
*/
QVector<float> QOpenGLShaderProgram::defaultOuterTessellationLevels() const
{
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
QVector<float> tessLevels(4, 1.0f);
Q_D(const QOpenGLShaderProgram);
if (d->tessellationFuncs)
@@ -3641,7 +3641,7 @@ QVector<float> QOpenGLShaderProgram::defaultOuterTessellationLevels() const
*/
void QOpenGLShaderProgram::setDefaultInnerTessellationLevels(const QVector<float> &levels)
{
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
Q_D(QOpenGLShaderProgram);
if (d->tessellationFuncs) {
QVector<float> tessLevels = levels;
@@ -3681,7 +3681,7 @@ void QOpenGLShaderProgram::setDefaultInnerTessellationLevels(const QVector<float
*/
QVector<float> QOpenGLShaderProgram::defaultInnerTessellationLevels() const
{
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
QVector<float> tessLevels(2, 1.0f);
Q_D(const QOpenGLShaderProgram);
if (d->tessellationFuncs)
diff --git a/src/opengl/qopengltexture.cpp b/src/opengl/qopengltexture.cpp
index 49ebdfbec2..a306e2eab8 100644
--- a/src/opengl/qopengltexture.cpp
+++ b/src/opengl/qopengltexture.cpp
@@ -3890,7 +3890,7 @@ bool QOpenGLTexture::hasFeature(Feature feature)
bool supported = false;
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (!ctx->isOpenGLES()) {
switch (feature) {
case ImmutableMultisampleStorage:
@@ -4242,7 +4242,7 @@ void QOpenGLTexture::generateMipMaps(int baseLevel, bool resetBaseLevel)
*/
void QOpenGLTexture::setSwizzleMask(SwizzleComponent component, SwizzleValue value)
{
-#if !defined(Q_OS_MAC) && !defined(QT_OPENGL_ES_2)
+#if !defined(Q_OS_MAC) && !QT_CONFIG(opengles2)
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
Q_D(QOpenGLTexture);
d->create();
@@ -4271,7 +4271,7 @@ void QOpenGLTexture::setSwizzleMask(SwizzleComponent component, SwizzleValue val
void QOpenGLTexture::setSwizzleMask(SwizzleValue r, SwizzleValue g,
SwizzleValue b, SwizzleValue a)
{
-#if !defined(Q_OS_MAC) && !defined(QT_OPENGL_ES_2)
+#if !defined(Q_OS_MAC) && !QT_CONFIG(opengles2)
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
Q_D(QOpenGLTexture);
d->create();
@@ -4331,7 +4331,7 @@ QOpenGLTexture::SwizzleValue QOpenGLTexture::swizzleMask(SwizzleComponent compon
*/
void QOpenGLTexture::setDepthStencilMode(QOpenGLTexture::DepthStencilMode mode)
{
-#if !defined(Q_OS_MAC) && !defined(QT_OPENGL_ES_2)
+#if !defined(Q_OS_MAC) && !QT_CONFIG(opengles2)
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
Q_D(QOpenGLTexture);
d->create();
@@ -4628,7 +4628,7 @@ void QOpenGLTexture::setBorderColor(const QColor &color)
*/
void QOpenGLTexture::setBorderColor(float r, float g, float b, float a)
{
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
Q_D(QOpenGLTexture);
d->create();
@@ -4661,7 +4661,7 @@ void QOpenGLTexture::setBorderColor(float r, float g, float b, float a)
*/
void QOpenGLTexture::setBorderColor(int r, int g, int b, int a)
{
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
Q_D(QOpenGLTexture);
d->create();
@@ -4696,7 +4696,7 @@ void QOpenGLTexture::setBorderColor(int r, int g, int b, int a)
*/
void QOpenGLTexture::setBorderColor(uint r, uint g, uint b, uint a)
{
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
Q_D(QOpenGLTexture);
d->create();
@@ -4808,7 +4808,7 @@ void QOpenGLTexture::borderColor(unsigned int *border) const
*/
void QOpenGLTexture::setMinimumLevelOfDetail(float value)
{
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
Q_D(QOpenGLTexture);
d->create();
@@ -4845,7 +4845,7 @@ float QOpenGLTexture::minimumLevelOfDetail() const
*/
void QOpenGLTexture::setMaximumLevelOfDetail(float value)
{
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
Q_D(QOpenGLTexture);
d->create();
@@ -4881,7 +4881,7 @@ float QOpenGLTexture::maximumLevelOfDetail() const
*/
void QOpenGLTexture::setLevelOfDetailRange(float min, float max)
{
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
Q_D(QOpenGLTexture);
d->create();
@@ -4923,7 +4923,7 @@ QPair<float, float> QOpenGLTexture::levelOfDetailRange() const
*/
void QOpenGLTexture::setLevelofDetailBias(float bias)
{
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (!QOpenGLContext::currentContext()->isOpenGLES()) {
Q_D(QOpenGLTexture);
d->create();
diff --git a/src/opengl/qopengltextureglyphcache.cpp b/src/opengl/qopengltextureglyphcache.cpp
index 66fd3a7507..a38d4328cc 100644
--- a/src/opengl/qopengltextureglyphcache.cpp
+++ b/src/opengl/qopengltextureglyphcache.cpp
@@ -92,7 +92,7 @@ QOpenGLTextureGlyphCache::~QOpenGLTextureGlyphCache()
clear();
}
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
static inline bool isCoreProfile()
{
return QOpenGLContext::currentContext()->format().profile() == QSurfaceFormat::CoreProfile;
@@ -143,7 +143,7 @@ void QOpenGLTextureGlyphCache::createTextureData(int width, int height)
QVarLengthArray<uchar> data(width * height);
for (int i = 0; i < data.size(); ++i)
data[i] = 0;
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
const GLint internalFormat = isCoreProfile() ? GL_R8 : GL_ALPHA;
const GLenum format = isCoreProfile() ? GL_RED : GL_ALPHA;
#else
@@ -233,11 +233,11 @@ static void load_glyph_image_to_texture(QOpenGLContext *ctx,
funcs->glBindTexture(GL_TEXTURE_2D, texture);
if (img.depth() == 32) {
-#ifdef QT_OPENGL_ES_2
+#if QT_CONFIG(opengles2)
GLenum fmt = GL_RGBA;
#else
GLenum fmt = ctx->isOpenGLES() ? GL_RGBA : GL_BGRA;
-#endif // QT_OPENGL_ES_2
+#endif // QT_CONFIG(opengles2)
#if Q_BYTE_ORDER == Q_BIG_ENDIAN
fmt = GL_RGBA;
@@ -246,7 +246,7 @@ static void load_glyph_image_to_texture(QOpenGLContext *ctx,
} else {
// The scanlines in image are 32-bit aligned, even for mono or 8-bit formats. This
// is good because it matches the default of 4 bytes for GL_UNPACK_ALIGNMENT.
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
const GLenum format = isCoreProfile() ? GL_RED : GL_ALPHA;
#else
const GLenum format = GL_ALPHA;
diff --git a/src/opengl/qopengltexturehelper.cpp b/src/opengl/qopengltexturehelper.cpp
index 8f1473ecc9..9aab0bcc79 100644
--- a/src/opengl/qopengltexturehelper.cpp
+++ b/src/opengl/qopengltexturehelper.cpp
@@ -143,7 +143,7 @@ QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context)
TextureImage2DMultisample = &QOpenGLTextureHelper::qt_TextureImage2DMultisample;
}
-#if defined(QT_OPENGL_ES_2)
+#if QT_CONFIG(opengles2)
// Here we are targeting OpenGL ES 2.0+ only. This is likely using EGL, where,
// similarly to WGL, non-extension functions (i.e. any function that is part of the
// GLES spec) *may* not be queried via eglGetProcAddress.
@@ -221,7 +221,7 @@ QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context)
}
}
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
// OpenGL 1.0 and 1.1
TexImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLsizei , GLint , GLenum , GLenum , const GLvoid *)>(context->getProcAddress("glTexImage1D"));
TexSubImage1D = reinterpret_cast<void (QOPENGLF_APIENTRYP)(GLenum , GLint , GLint , GLsizei , GLenum , GLenum , const GLvoid *)>(context->getProcAddress("glTexSubImage1D"));\
diff --git a/src/opengl/qopengltexturehelper_p.h b/src/opengl/qopengltexturehelper_p.h
index a62a47d029..d3c17c33a4 100644
--- a/src/opengl/qopengltexturehelper_p.h
+++ b/src/opengl/qopengltexturehelper_p.h
@@ -628,7 +628,7 @@ public:
int val = 0;
functions->glGetIntegerv(GL_UNPACK_ALIGNMENT, &val);
options.setAlignment(val);
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
functions->glGetIntegerv(GL_UNPACK_SKIP_IMAGES, &val);
options.setSkipImages(val);
functions->glGetIntegerv(GL_UNPACK_SKIP_ROWS, &val);
@@ -651,7 +651,7 @@ public:
inline void setPixelUploadOptions(const QOpenGLPixelTransferOptions &options)
{
functions->glPixelStorei(GL_UNPACK_ALIGNMENT, options.alignment());
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
functions->glPixelStorei(GL_UNPACK_SKIP_IMAGES, options.skipImages());
functions->glPixelStorei(GL_UNPACK_SKIP_ROWS, options.skipRows());
functions->glPixelStorei(GL_UNPACK_SKIP_PIXELS, options.skipPixels());
diff --git a/src/opengl/qopengltimerquery.h b/src/opengl/qopengltimerquery.h
index a779240108..fa0e5b3203 100644
--- a/src/opengl/qopengltimerquery.h
+++ b/src/opengl/qopengltimerquery.h
@@ -42,7 +42,7 @@
#include <QtOpenGL/qtopenglglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtCore/QObject>
#include <QtGui/qopengl.h>
diff --git a/src/opengl/qopenglversionfunctions.cpp b/src/opengl/qopenglversionfunctions.cpp
index 016683a3f2..61794fdec9 100644
--- a/src/opengl/qopenglversionfunctions.cpp
+++ b/src/opengl/qopenglversionfunctions.cpp
@@ -103,7 +103,7 @@ QOpenGLVersionFunctionsStorage::QOpenGLVersionFunctionsStorage()
QOpenGLVersionFunctionsStorage::~QOpenGLVersionFunctionsStorage()
{
-#ifndef QT_OPENGL_ES
+#if !QT_CONFIG(opengles2)
if (backends) {
int i = 0;
@@ -122,7 +122,7 @@ QOpenGLVersionFunctionsStorage::~QOpenGLVersionFunctionsStorage()
QOpenGLVersionFunctionsBackend *QOpenGLVersionFunctionsStorage::backend(QOpenGLContext *context, QOpenGLVersionFunctionsBackend::Version v)
{
-#ifdef QT_OPENGL_ES
+#if QT_CONFIG(opengles2)
Q_UNUSED(context);
Q_UNUSED(v);
return 0;
@@ -339,7 +339,7 @@ QOpenGLContext *QAbstractOpenGLFunctions::owningContext() const
return d->owningContext;
}
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
QT_OPENGL_IMPLEMENT(QOpenGLFunctions_1_0_CoreBackend, QT_OPENGL_1_0_FUNCTIONS)
QT_OPENGL_IMPLEMENT(QOpenGLFunctions_1_1_CoreBackend, QT_OPENGL_1_1_FUNCTIONS)
@@ -376,6 +376,6 @@ QT_OPENGL_IMPLEMENT(QOpenGLFunctions_4_5_DeprecatedBackend, QT_OPENGL_4_5_DEPREC
// No backends for OpenGL ES 2
-#endif // !QT_OPENGL_ES_2
+#endif // !QT_CONFIG(opengles2)
QT_END_NAMESPACE
diff --git a/src/opengl/qopenglversionfunctions.h b/src/opengl/qopenglversionfunctions.h
index 47e7e37d3a..a28a3c5d14 100644
--- a/src/opengl/qopenglversionfunctions.h
+++ b/src/opengl/qopenglversionfunctions.h
@@ -240,7 +240,7 @@ inline QAbstractOpenGLFunctionsPrivate *QAbstractOpenGLFunctionsPrivate::get(QAb
return q->d_func();
}
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
class QOpenGLFunctions_1_0_CoreBackend : public QOpenGLVersionFunctionsBackend
{
@@ -1894,7 +1894,7 @@ public:
// No need for backend classes with function pointers with ES2.
// All function addresses are independent of context and display.
-#endif // !QT_OPENGL_ES_2
+#endif // !QT_CONFIG(opengles2)
#undef QT_OPENGL_DECLARE_FUNCTIONS
#undef QT_OPENGL_COUNT_FUNCTIONS
diff --git a/src/opengl/qopenglversionfunctionsfactory.cpp b/src/opengl/qopenglversionfunctionsfactory.cpp
index de7fe6c07f..d377c64961 100644
--- a/src/opengl/qopenglversionfunctionsfactory.cpp
+++ b/src/opengl/qopenglversionfunctionsfactory.cpp
@@ -49,7 +49,7 @@
#include "qopenglversionfunctionsfactory.h"
#include "qopenglversionfunctions_p.h"
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
#include "qopenglfunctions_4_5_core.h"
#include "qopenglfunctions_4_5_compatibility.h"
#include "qopenglfunctions_4_4_core.h"
@@ -84,7 +84,7 @@ QT_BEGIN_NAMESPACE
static QAbstractOpenGLFunctions *createFunctions(const QOpenGLVersionProfile &versionProfile)
{
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
const int major = versionProfile.version().first;
const int minor = versionProfile.version().second;
@@ -231,12 +231,12 @@ QAbstractOpenGLFunctions *QOpenGLVersionFunctionsFactory::get(const QOpenGLVersi
return nullptr;
}
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
if (context->isOpenGLES()) {
qWarning("versionFunctions: Not supported on OpenGL ES");
return nullptr;
}
-#endif // QT_OPENGL_ES_2
+#endif // !QT_CONFIG(opengles2)
const QSurfaceFormat f = context->format();
diff --git a/src/opengl/qopenglvertexarrayobject.cpp b/src/opengl/qopenglvertexarrayobject.cpp
index e4bd24ef58..9c85d73c22 100644
--- a/src/opengl/qopenglvertexarrayobject.cpp
+++ b/src/opengl/qopenglvertexarrayobject.cpp
@@ -171,7 +171,7 @@ bool QOpenGLVertexArrayObjectPrivate::create()
vaoFuncs.core_3_0 = nullptr;
vaoFuncsType = NotSupported;
QSurfaceFormat format = ctx->format();
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
if (format.version() >= qMakePair<int, int>(3,2)) {
vaoFuncs.core_3_2 = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_3_2_Core>(ctx);
vaoFuncsType = Core_3_2;
@@ -236,7 +236,7 @@ void QOpenGLVertexArrayObjectPrivate::destroy()
if (vao && ctx) {
switch (vaoFuncsType) {
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
case Core_3_2:
vaoFuncs.core_3_2->glDeleteVertexArrays(1, &vao);
break;
@@ -273,7 +273,7 @@ void QOpenGLVertexArrayObjectPrivate::_q_contextAboutToBeDestroyed()
void QOpenGLVertexArrayObjectPrivate::bind()
{
switch (vaoFuncsType) {
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
case Core_3_2:
vaoFuncs.core_3_2->glBindVertexArray(vao);
break;
@@ -294,7 +294,7 @@ void QOpenGLVertexArrayObjectPrivate::bind()
void QOpenGLVertexArrayObjectPrivate::release()
{
switch (vaoFuncsType) {
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
case Core_3_2:
vaoFuncs.core_3_2->glBindVertexArray(0);
break;
diff --git a/src/openglextensions/qopenglextensions.cpp b/src/openglextensions/qopenglextensions.cpp
index 1660181e97..fadde172f5 100644
--- a/src/openglextensions/qopenglextensions.cpp
+++ b/src/openglextensions/qopenglextensions.cpp
@@ -87,7 +87,7 @@ bool QAbstractOpenGLExtension::isInitialized() const
return d->initialized;
}
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
QOpenGLExtension_3DFX_tbuffer::QOpenGLExtension_3DFX_tbuffer()
: QAbstractOpenGLExtension(*(new QOpenGLExtension_3DFX_tbufferPrivate))
diff --git a/src/openglextensions/qopenglextensions.h b/src/openglextensions/qopenglextensions.h
index eb473f3699..6ae96f5563 100644
--- a/src/openglextensions/qopenglextensions.h
+++ b/src/openglextensions/qopenglextensions.h
@@ -107,7 +107,7 @@ protected:
QAbstractOpenGLExtensionPrivate *d_ptr;
};
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
class QOpenGLExtension_3DFX_tbufferPrivate : public QAbstractOpenGLExtensionPrivate
{
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
index 63cf771f32..d38a850065 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext.cpp
@@ -466,7 +466,7 @@ QFunctionPointer QEGLPlatformContext::getProcAddress(const char *procName)
const char *name;
QFunctionPointer func;
} standardFuncs[] = {
-#ifdef QT_OPENGL_ES_2
+#if QT_CONFIG(opengles2)
{ "glBindTexture", (QFunctionPointer) ::glBindTexture },
{ "glBlendFunc", (QFunctionPointer) ::glBlendFunc },
{ "glClear", (QFunctionPointer) ::glClear },
@@ -611,9 +611,9 @@ QFunctionPointer QEGLPlatformContext::getProcAddress(const char *procName)
{ "glClearDepthf", (QFunctionPointer) ::glClearDepthf },
{ "glDepthRangef", (QFunctionPointer) ::glDepthRangef },
-#endif // QT_OPENGL_ES_2
+#endif // QT_CONFIG(opengles2)
-#ifdef QT_OPENGL_ES_3
+#if QT_CONFIG(opengles3)
{ "glBeginQuery", (QFunctionPointer) ::glBeginQuery },
{ "glBeginTransformFeedback", (QFunctionPointer) ::glBeginTransformFeedback },
{ "glBindBufferBase", (QFunctionPointer) ::glBindBufferBase },
@@ -718,9 +718,9 @@ QFunctionPointer QEGLPlatformContext::getProcAddress(const char *procName)
{ "glVertexAttribI4uiv", (QFunctionPointer) ::glVertexAttribI4uiv },
{ "glVertexAttribIPointer", (QFunctionPointer) ::glVertexAttribIPointer },
{ "glWaitSync", (QFunctionPointer) ::glWaitSync },
-#endif // QT_OPENGL_ES_3
+#endif // QT_CONFIG(opengles3)
-#ifdef QT_OPENGL_ES_3_1
+#if QT_CONFIG(opengles31)
{ "glActiveShaderProgram", (QFunctionPointer) ::glActiveShaderProgram },
{ "glBindImageTexture", (QFunctionPointer) ::glBindImageTexture },
{ "glBindProgramPipeline", (QFunctionPointer) ::glBindProgramPipeline },
@@ -789,9 +789,9 @@ QFunctionPointer QEGLPlatformContext::getProcAddress(const char *procName)
{ "glVertexAttribFormat", (QFunctionPointer) ::glVertexAttribFormat },
{ "glVertexAttribIFormat", (QFunctionPointer) ::glVertexAttribIFormat },
{ "glVertexBindingDivisor", (QFunctionPointer) ::glVertexBindingDivisor },
-#endif // QT_OPENGL_ES_3_1
+#endif // QT_CONFIG(opengles31)
-#ifdef QT_OPENGL_ES_3_2
+#if QT_CONFIG(opengles32)
{ "glBlendBarrier", (QFunctionPointer) ::glBlendBarrier },
{ "glCopyImageSubData", (QFunctionPointer) ::glCopyImageSubData },
{ "glDebugMessageControl", (QFunctionPointer) ::glDebugMessageControl },
@@ -836,7 +836,7 @@ QFunctionPointer QEGLPlatformContext::getProcAddress(const char *procName)
{ "glTexBuffer", (QFunctionPointer) ::glTexBuffer },
{ "glTexBufferRange", (QFunctionPointer) ::glTexBufferRange },
{ "glTexStorage3DMultisample", (QFunctionPointer) ::glTexStorage3DMultisample },
-#endif // QT_OPENGL_ES_3_2
+#endif // QT_CONFIG(opengles32)
};
for (size_t i = 0; i < sizeof(standardFuncs) / sizeof(StdFunc); ++i) {
diff --git a/src/plugins/platforms/windows/qwindowseglcontext.cpp b/src/plugins/platforms/windows/qwindowseglcontext.cpp
index 4ae087dfaa..d0b3568dad 100644
--- a/src/plugins/platforms/windows/qwindowseglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowseglcontext.cpp
@@ -44,7 +44,7 @@
#include <QtCore/qdebug.h>
#include <QtGui/qopenglcontext.h>
-#if defined(QT_OPENGL_ES_2_ANGLE) || defined(QT_OPENGL_DYNAMIC)
+#if QT_CONFIG(angle) || defined(QT_OPENGL_DYNAMIC)
# include <EGL/eglext.h>
#endif
diff --git a/src/plugins/platforms/windows/qwindowsintegration.cpp b/src/plugins/platforms/windows/qwindowsintegration.cpp
index 2c87e80ec7..9add72d266 100644
--- a/src/plugins/platforms/windows/qwindowsintegration.cpp
+++ b/src/plugins/platforms/windows/qwindowsintegration.cpp
@@ -84,10 +84,10 @@
#include <limits.h>
-#if defined(QT_OPENGL_ES_2) || defined(QT_OPENGL_DYNAMIC)
+#if QT_CONFIG(opengles2) || defined(QT_OPENGL_DYNAMIC)
# include "qwindowseglcontext.h"
#endif
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
# include "qwindowsglcontext.h"
#endif
@@ -455,7 +455,7 @@ QWindowsStaticOpenGLContext *QWindowsStaticOpenGLContext::doCreate()
return eglCtx;
}
return QOpenGLStaticContext::create(true);
-#elif defined(QT_OPENGL_ES_2)
+#elif QT_CONFIG(opengles2)
QWindowsOpenGLTester::Renderers glesRenderers = QWindowsOpenGLTester::requestedGlesRenderer();
if (glesRenderers == QWindowsOpenGLTester::InvalidRenderer)
glesRenderers = QWindowsOpenGLTester::supportedRenderers(QWindowsOpenGLTester::AngleRendererD3d11);
@@ -483,7 +483,7 @@ QPlatformOpenGLContext *QWindowsIntegration::createPlatformOpenGLContext(QOpenGL
QOpenGLContext::OpenGLModuleType QWindowsIntegration::openGLModuleType()
{
-#if defined(QT_OPENGL_ES_2)
+#if QT_CONFIG(opengles2)
return QOpenGLContext::LibGLES;
#elif !defined(QT_OPENGL_DYNAMIC)
return QOpenGLContext::LibGL;
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
index 75189a9c80..0fd421e925 100644
--- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp
@@ -241,7 +241,7 @@ QGLXContext::QGLXContext(QXcbScreen *screen, const QSurfaceFormat &format, QPlat
void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share)
{
if (m_format.renderableType() == QSurfaceFormat::DefaultRenderableType)
-#if defined(QT_OPENGL_ES_2)
+#if QT_CONFIG(opengles2)
m_format.setRenderableType(QSurfaceFormat::OpenGLES);
#else
m_format.setRenderableType(QSurfaceFormat::OpenGL);
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index e79c4b9bcd..4e391bf4ae 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -10447,7 +10447,7 @@ void QWidget::setParent(QWidget *parent, Qt::WindowFlags f)
// (f & Qt::MSWindowsOwnDC) clause (which is set on QGLWidgets on all
// platforms).
if (newParent
-#if defined(QT_OPENGL_ES)
+#if QT_CONFIG(opengles2)
|| (f & Qt::MSWindowsOwnDC)
#endif
) {
diff --git a/tests/auto/cmake/test_openglextensions_module/main.cpp b/tests/auto/cmake/test_openglextensions_module/main.cpp
index 40d33e31c1..ddaadc0791 100644
--- a/tests/auto/cmake/test_openglextensions_module/main.cpp
+++ b/tests/auto/cmake/test_openglextensions_module/main.cpp
@@ -33,7 +33,7 @@
int main(int argc, char **argv)
{
-#if defined(QT_OPENGL_ES_2)
+#if QT_CONFIG(opengles2)
QOpenGLExtension_OES_vertex_array_object obj;
#else
QOpenGLExtension_ARB_draw_buffers obj;
diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp
index ca12461efa..7236c22fd0 100644
--- a/tests/auto/gui/qopengl/tst_qopengl.cpp
+++ b/tests/auto/gui/qopengl/tst_qopengl.cpp
@@ -57,7 +57,7 @@
#include <QtPlatformHeaders/QGLXNativeContext>
#endif
-#if defined(Q_OS_WIN32) && !defined(QT_OPENGL_ES_2)
+#if defined(Q_OS_WIN32) && !QT_CONFIG(opengles2)
#include <QtPlatformHeaders/QWGLNativeContext>
#endif
@@ -107,7 +107,7 @@ private slots:
void glxContextWrap();
#endif
-#if defined(Q_OS_WIN32) && !defined(QT_OPENGL_ES_2)
+#if defined(Q_OS_WIN32) && !QT_CONFIG(opengles2)
void wglContextWrap();
#endif
@@ -633,7 +633,7 @@ static bool supportsInternalFboFormat(QOpenGLContext *ctx, int glFormat)
{
if (ctx->format().majorVersion() < 3)
return false;
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
if (!ctx->isOpenGLES() && ctx->format().majorVersion() >= 4) {
GLint value = -1;
auto *vFuncs = QOpenGLVersionFunctionsFactory::get<QOpenGLFunctions_4_2_Core>(ctx);
@@ -1519,7 +1519,7 @@ void tst_QOpenGL::glxContextWrap()
}
#endif // USE_GLX
-#if defined(Q_OS_WIN32) && !defined(QT_OPENGL_ES_2)
+#if defined(Q_OS_WIN32) && !QT_CONFIG(opengles2)
void tst_QOpenGL::wglContextWrap()
{
QScopedPointer<QOpenGLContext> ctx(new QOpenGLContext);
@@ -1572,7 +1572,7 @@ void tst_QOpenGL::wglContextWrap()
QVERIFY(adopted->makeCurrent(window.data()));
adopted->doneCurrent();
}
-#endif // Q_OS_WIN32 && !QT_OPENGL_ES_2
+#endif // Q_OS_WIN32 && !QT_CONFIG(opengles2)
void tst_QOpenGL::vaoCreate()
{
diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp
index d860caaa37..58f4ca866e 100644
--- a/tests/auto/opengl/qgl/tst_qgl.cpp
+++ b/tests/auto/opengl/qgl/tst_qgl.cpp
@@ -747,14 +747,14 @@ void tst_QGL::openGLVersionCheck()
// However, the complicated parts are in openGLVersionFlags(const QString &versionString)
// tested above
-#if defined(QT_OPENGL_ES_2)
+#if QT_CONFIG(opengles2)
QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0);
#else
if (QOpenGLContext::currentContext()->isOpenGLES())
QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_ES_Version_2_0);
else
QVERIFY(QGLFormat::openGLVersionFlags() & QGLFormat::OpenGL_Version_1_1);
-#endif //defined(QT_OPENGL_ES_2)
+#endif //QT_CONFIG(opengles2)
}
#endif //QT_BUILD_INTERNAL
@@ -1639,7 +1639,7 @@ void tst_QGL::fboFormat()
QCOMPARE(format1.attachment(), QGLFramebufferObject::NoAttachment);
QCOMPARE(int(format1.textureTarget()), int(GL_TEXTURE_2D));
int expectedFormat =
-#ifdef QT_OPENGL_ES_2
+#if QT_CONFIG(opengles2)
GL_RGBA;
#else
QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL ? GL_RGBA : GL_RGBA8;
@@ -1716,7 +1716,7 @@ void tst_QGL::fboFormat()
QCOMPARE(format1c, format3c);
QVERIFY(!(format1c != format3c));
format3c.setInternalTextureFormat(
-#ifdef QT_OPENGL_ES_2
+#if QT_CONFIG(opengles2)
GL_RGBA
#else
QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL ? GL_RGBA : GL_RGBA8
@@ -1729,7 +1729,7 @@ void tst_QGL::fboFormat()
QCOMPARE(format1c, format4c);
QVERIFY(!(format1c != format4c));
format4c.setInternalTextureFormat(
-#ifdef QT_OPENGL_ES_2
+#if QT_CONFIG(opengles2)
GL_RGBA
#else
QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL ? GL_RGBA : GL_RGBA8
diff --git a/util/glgen/codegenerator.cpp b/util/glgen/codegenerator.cpp
index e1c70f1aea..09af46f469 100644
--- a/util/glgen/codegenerator.cpp
+++ b/util/glgen/codegenerator.cpp
@@ -187,7 +187,7 @@ void CodeGenerator::writeCoreFactoryImplementation(const QString &fileName) cons
std::sort(versions.begin(), versions.end(), std::greater<Version>());
// Outout the #include statements
- stream << QStringLiteral("#if !defined(QT_OPENGL_ES_2)") << Qt::endl;
+ stream << QStringLiteral("#if !QT_CONFIG(opengles2)") << Qt::endl;
Q_FOREACH (const Version &classVersion, versions) {
if (!versionHasProfiles(classVersion)) {
stream << QString(QStringLiteral("#include \"qopenglfunctions_%1_%2.h\""))
@@ -217,7 +217,7 @@ void CodeGenerator::writeCoreFactoryImplementation(const QString &fileName) cons
stream << QStringLiteral("QT_BEGIN_NAMESPACE") << Qt::endl << Qt::endl;
stream << QStringLiteral("QAbstractOpenGLFunctions *QOpenGLVersionFunctionsFactory::create(const QOpenGLVersionProfile &versionProfile)") << Qt::endl;
stream << QStringLiteral("{") << Qt::endl;
- stream << QStringLiteral("#if !defined(QT_OPENGL_ES_2)") << Qt::endl;
+ stream << QStringLiteral("#if !QT_CONFIG(opengles2)") << Qt::endl;
stream << QStringLiteral(" const int major = versionProfile.version().first;") << Qt::endl;
stream << QStringLiteral(" const int minor = versionProfile.version().second;") << Qt::endl << Qt::endl;
diff --git a/util/glgen/qopenglextensions.cpp.header b/util/glgen/qopenglextensions.cpp.header
index 1d23f3cc65..5df04ca7ff 100644
--- a/util/glgen/qopenglextensions.cpp.header
+++ b/util/glgen/qopenglextensions.cpp.header
@@ -81,5 +81,4 @@ bool QAbstractOpenGLExtension::isInitialized() const
return d->initialized;
}
-#if !defined(QT_OPENGL_ES_2)
-
+#if !QT_CONFIG(opengles2)
diff --git a/util/glgen/qopenglextensions.h.header b/util/glgen/qopenglextensions.h.header
index 45cb2c9b90..eec9f955bb 100644
--- a/util/glgen/qopenglextensions.h.header
+++ b/util/glgen/qopenglextensions.h.header
@@ -101,5 +101,4 @@ protected:
QAbstractOpenGLExtensionPrivate *d_ptr;
};
-#if !defined(QT_OPENGL_ES_2)
-
+#if !QT_CONFIG(opengles2)
diff --git a/util/glgen/qopenglversionfunctions.cpp.footer b/util/glgen/qopenglversionfunctions.cpp.footer
index f003b56097..56119834af 100644
--- a/util/glgen/qopenglversionfunctions.cpp.footer
+++ b/util/glgen/qopenglversionfunctions.cpp.footer
@@ -3,6 +3,6 @@
// No backends for OpenGL ES 2
-#endif // !QT_OPENGL_ES_2
+#endif // !QT_CONFIG(opengles2)
QT_END_NAMESPACE
diff --git a/util/glgen/qopenglversionfunctions.cpp.header b/util/glgen/qopenglversionfunctions.cpp.header
index 587408ca6a..ebbce06020 100644
--- a/util/glgen/qopenglversionfunctions.cpp.header
+++ b/util/glgen/qopenglversionfunctions.cpp.header
@@ -203,5 +203,5 @@ QOpenGLContext *QAbstractOpenGLFunctions::owningContext() const
return d->owningContext;
}
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
diff --git a/util/glgen/qopenglversionfunctions.h.footer b/util/glgen/qopenglversionfunctions.h.footer
index dc29c75177..82897fbe83 100644
--- a/util/glgen/qopenglversionfunctions.h.footer
+++ b/util/glgen/qopenglversionfunctions.h.footer
@@ -4,7 +4,7 @@
// No need for backend classes with function pointers with ES2.
// All function addresses are independent of context and display.
-#endif // !QT_OPENGL_ES_2
+#endif // !QT_CONFIG(opengles2)
QT_END_NAMESPACE
diff --git a/util/glgen/qopenglversionfunctions.h.header b/util/glgen/qopenglversionfunctions.h.header
index 951d09c1d1..717afba314 100644
--- a/util/glgen/qopenglversionfunctions.h.header
+++ b/util/glgen/qopenglversionfunctions.h.header
@@ -147,5 +147,5 @@ protected:
friend class QOpenGLContext;
};
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
diff --git a/util/glgen/qopenglversionfunctions__VERSION__.h.footer b/util/glgen/qopenglversionfunctions__VERSION__.h.footer
index b81155c102..565738bf25 100644
--- a/util/glgen/qopenglversionfunctions__VERSION__.h.footer
+++ b/util/glgen/qopenglversionfunctions__VERSION__.h.footer
@@ -1,6 +1,6 @@
QT_END_NAMESPACE
-#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
+#endif // QT_NO_OPENGL && !QT_CONFIG(opengles2)
#endif
diff --git a/util/glgen/qopenglversionfunctions__VERSION__.h.header b/util/glgen/qopenglversionfunctions__VERSION__.h.header
index 7e2f596195..2000c4fbf2 100644
--- a/util/glgen/qopenglversionfunctions__VERSION__.h.header
+++ b/util/glgen/qopenglversionfunctions__VERSION__.h.header
@@ -40,7 +40,7 @@
#include <QtCore/qglobal.h>
-#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+#if !defined(QT_NO_OPENGL) && !QT_CONFIG(opengles2)
#include <QtGui/QOpenGLVersionFunctions>
#include <QtGui/qopenglcontext.h>