summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl')
-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
42 files changed, 112 insertions, 112 deletions
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;