aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/3rdparty/masm/wtf/Platform.h3
-rw-r--r--src/particles/qquickimageparticle.cpp8
-rw-r--r--src/quick/designer/qquickdesignersupport.cpp2
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp2
-rw-r--r--src/quick/scenegraph/qsgdefaultinternalimagenode.cpp2
-rw-r--r--src/quick/scenegraph/qsgopengldistancefieldglyphcache.cpp14
-rw-r--r--src/quick/scenegraph/qsgopengldistancefieldglyphcache_p.h4
-rw-r--r--src/quick/scenegraph/util/qsgdepthstencilbuffer.cpp6
-rw-r--r--src/quick/scenegraph/util/qsgopenglatlastexture.cpp6
9 files changed, 22 insertions, 25 deletions
diff --git a/src/3rdparty/masm/wtf/Platform.h b/src/3rdparty/masm/wtf/Platform.h
index ab1da2198a..29decfadcf 100644
--- a/src/3rdparty/masm/wtf/Platform.h
+++ b/src/3rdparty/masm/wtf/Platform.h
@@ -1043,9 +1043,6 @@
#if PLATFORM(QT)
#include <qglobal.h>
-#if defined(QT_OPENGL_ES_2) && !defined(WTF_USE_OPENGL_ES_2)
-#define WTF_USE_OPENGL_ES_2 1
-#endif
#endif
#if !PLATFORM(IOS) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
diff --git a/src/particles/qquickimageparticle.cpp b/src/particles/qquickimageparticle.cpp
index 4d67691771..ce7e99a3a0 100644
--- a/src/particles/qquickimageparticle.cpp
+++ b/src/particles/qquickimageparticle.cpp
@@ -606,14 +606,14 @@ public:
}
void activate() override {
-#if !defined(QT_OPENGL_ES_2) && !defined(Q_OS_WIN)
+#if !QT_CONFIG(opengles2) && !defined(Q_OS_WIN)
glEnable(GL_POINT_SPRITE);
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
#endif
}
void deactivate() override {
-#if !defined(QT_OPENGL_ES_2) && !defined(Q_OS_WIN)
+#if !QT_CONFIG(opengles2) && !defined(Q_OS_WIN)
glDisable(GL_POINT_SPRITE);
glDisable(GL_VERTEX_PROGRAM_POINT_SIZE);
#endif
@@ -754,14 +754,14 @@ public:
}
void activate() override {
-#if !defined(QT_OPENGL_ES_2) && !defined(Q_OS_WIN)
+#if !QT_CONFIG(opengles2) && !defined(Q_OS_WIN)
glEnable(GL_POINT_SPRITE);
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
#endif
}
void deactivate() override {
-#if !defined(QT_OPENGL_ES_2) && !defined(Q_OS_WIN)
+#if !QT_CONFIG(opengles2) && !defined(Q_OS_WIN)
glDisable(GL_POINT_SPRITE);
glDisable(GL_VERTEX_PROGRAM_POINT_SIZE);
#endif
diff --git a/src/quick/designer/qquickdesignersupport.cpp b/src/quick/designer/qquickdesignersupport.cpp
index 48b6b9733b..a2820fbba2 100644
--- a/src/quick/designer/qquickdesignersupport.cpp
+++ b/src/quick/designer/qquickdesignersupport.cpp
@@ -97,7 +97,7 @@ void QQuickDesignerSupport::refFromEffectItem(QQuickItem *referencedItem, bool h
texture->setSize(itemSize.toSize());
texture->setRecursive(true);
#if QT_CONFIG(opengl)
-#ifndef QT_OPENGL_ES
+#if !QT_CONFIG(opengles2)
if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL)
texture->setFormat(GL_RGBA8);
else
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index ee96085c69..bc05e8d4f3 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -2963,7 +2963,7 @@ void Renderer::updateLineWidth(QSGGeometry *g) // legacy (GL-only)
{
if (g->drawingMode() == GL_LINE_STRIP || g->drawingMode() == GL_LINE_LOOP || g->drawingMode() == GL_LINES)
glLineWidth(g->lineWidth());
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
else {
QOpenGLContext *ctx = m_context->openglContext();
if (!ctx->isOpenGLES() && g->drawingMode() == GL_POINTS) {
diff --git a/src/quick/scenegraph/qsgdefaultinternalimagenode.cpp b/src/quick/scenegraph/qsgdefaultinternalimagenode.cpp
index 167d2b01dd..e609bea439 100644
--- a/src/quick/scenegraph/qsgdefaultinternalimagenode.cpp
+++ b/src/quick/scenegraph/qsgdefaultinternalimagenode.cpp
@@ -254,7 +254,7 @@ bool QSGDefaultInternalImageNode::supportsWrap(const QSize &size) const
|| (isPowerOfTwo(size.width()) && isPowerOfTwo(size.height()));
} else {
QOpenGLContext *ctx = QOpenGLContext::currentContext();
-#ifndef QT_OPENGL_ES_2
+#if !QT_CONFIG(opengles2)
if (ctx->isOpenGLES())
#endif
{
diff --git a/src/quick/scenegraph/qsgopengldistancefieldglyphcache.cpp b/src/quick/scenegraph/qsgopengldistancefieldglyphcache.cpp
index 2f9b1e4ce6..d757cdd048 100644
--- a/src/quick/scenegraph/qsgopengldistancefieldglyphcache.cpp
+++ b/src/quick/scenegraph/qsgopengldistancefieldglyphcache.cpp
@@ -53,7 +53,7 @@
#include "qsgcontext_p.h"
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
#include <qopenglfunctions_3_2_core.h>
#endif
@@ -77,7 +77,7 @@ QSGOpenGLDistanceFieldGlyphCache::QSGOpenGLDistanceFieldGlyphCache(QOpenGLContex
, m_blitBuffer(QOpenGLBuffer::VertexBuffer)
, m_fboGuard(nullptr)
, m_funcs(c->functions())
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
, m_coreFuncs(nullptr)
#endif
{
@@ -222,7 +222,7 @@ void QSGOpenGLDistanceFieldGlyphCache::storeGlyphs(const QList<QDistanceField> &
}
}
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
const GLenum format = isCoreProfile() ? GL_RED : GL_ALPHA;
#else
const GLenum format = GL_ALPHA;
@@ -291,7 +291,7 @@ void QSGOpenGLDistanceFieldGlyphCache::createTexture(TextureInfo *texInfo,
m_funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
m_funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
m_funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (!QOpenGLContext::currentContext()->isOpenGLES())
m_funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
const GLint internalFormat = isCoreProfile() ? GL_R8 : GL_ALPHA;
@@ -337,7 +337,7 @@ void QSGOpenGLDistanceFieldGlyphCache::resizeTexture(TextureInfo *texInfo, int w
updateTexture(oldTexture, texInfo->texture, texInfo->size);
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (isCoreProfile() && !useTextureResizeWorkaround()) {
// For an OpenGL Core Profile we can use http://www.opengl.org/wiki/Framebuffer#Blitting
// to efficiently copy the contents of the old texture to the new texture
@@ -388,7 +388,7 @@ void QSGOpenGLDistanceFieldGlyphCache::resizeTexture(TextureInfo *texInfo, int w
m_funcs->glGetIntegerv(GL_UNPACK_ALIGNMENT, &alignment);
m_funcs->glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
const GLenum format = isCoreProfile() ? GL_RED : GL_ALPHA;
#else
const GLenum format = GL_ALPHA;
@@ -434,7 +434,7 @@ void QSGOpenGLDistanceFieldGlyphCache::resizeTexture(TextureInfo *texInfo, int w
m_funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
m_funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
m_funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (!ctx->isOpenGLES())
m_funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
#endif
diff --git a/src/quick/scenegraph/qsgopengldistancefieldglyphcache_p.h b/src/quick/scenegraph/qsgopengldistancefieldglyphcache_p.h
index 2e7b5baae2..b095fc94a0 100644
--- a/src/quick/scenegraph/qsgopengldistancefieldglyphcache_p.h
+++ b/src/quick/scenegraph/qsgopengldistancefieldglyphcache_p.h
@@ -62,7 +62,7 @@
QT_BEGIN_NAMESPACE
class QOpenGLSharedResourceGuard;
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
class QOpenGLFunctions_3_2_Core;
#endif
@@ -154,7 +154,7 @@ private:
QOpenGLSharedResourceGuard *m_fboGuard;
QOpenGLFunctions *m_funcs;
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
QOpenGLFunctions_3_2_Core *m_coreFuncs;
#endif
};
diff --git a/src/quick/scenegraph/util/qsgdepthstencilbuffer.cpp b/src/quick/scenegraph/util/qsgdepthstencilbuffer.cpp
index c6091758bb..907dbdfd0e 100644
--- a/src/quick/scenegraph/util/qsgdepthstencilbuffer.cpp
+++ b/src/quick/scenegraph/util/qsgdepthstencilbuffer.cpp
@@ -112,7 +112,7 @@ QSGDefaultDepthStencilBuffer::QSGDefaultDepthStencilBuffer(QOpenGLContext *conte
m_functions.glGenRenderbuffers(1, &m_depthBuffer);
m_functions.glBindRenderbuffer(GL_RENDERBUFFER, m_depthBuffer);
if (format.samples && m_functions.hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample)) {
-#if defined(QT_OPENGL_ES_2)
+#if QT_CONFIG(opengles2)
m_functions.glRenderbufferStorageMultisample(GL_RENDERBUFFER, format.samples,
GL_DEPTH24_STENCIL8_OES, width, height);
#else
@@ -120,7 +120,7 @@ QSGDefaultDepthStencilBuffer::QSGDefaultDepthStencilBuffer(QOpenGLContext *conte
GL_DEPTH24_STENCIL8, width, height);
#endif
} else {
-#if defined(QT_OPENGL_ES_2)
+#if QT_CONFIG(opengles2)
m_functions.glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8_OES, width, height);
#else
m_functions.glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8, width, height);
@@ -145,7 +145,7 @@ QSGDefaultDepthStencilBuffer::QSGDefaultDepthStencilBuffer(QOpenGLContext *conte
if (!m_stencilBuffer && (format.attachments & StencilAttachment)) {
m_functions.glGenRenderbuffers(1, &m_stencilBuffer);
m_functions.glBindRenderbuffer(GL_RENDERBUFFER, m_stencilBuffer);
-#ifdef QT_OPENGL_ES
+#if QT_CONFIG(opengles2)
const GLenum internalFormat = GL_STENCIL_INDEX8;
#else
const GLenum internalFormat = context->isOpenGLES() ? GL_STENCIL_INDEX8 : GL_STENCIL_INDEX;
diff --git a/src/quick/scenegraph/util/qsgopenglatlastexture.cpp b/src/quick/scenegraph/util/qsgopenglatlastexture.cpp
index 0f29cb3b38..aa5ee3d7b8 100644
--- a/src/quick/scenegraph/util/qsgopenglatlastexture.cpp
+++ b/src/quick/scenegraph/util/qsgopenglatlastexture.cpp
@@ -222,7 +222,7 @@ void AtlasBase::bind(QSGTexture::Filtering filtering)
funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-#if !defined(QT_OPENGL_ES_2)
+#if !QT_CONFIG(opengles2)
if (!QOpenGLContext::currentContext()->isOpenGLES())
funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
#endif
@@ -295,7 +295,7 @@ Atlas::Atlas(const QSize &size)
m_internalFormat = GL_RGBA;
m_externalFormat = GL_BGRA;
-#ifndef QT_OPENGL_ES
+#if !QT_CONFIG(opengles2)
if (QOpenGLContext::currentContext()->isOpenGLES()) {
#endif
@@ -332,7 +332,7 @@ Atlas::Atlas(const QSize &size)
m_internalFormat = m_externalFormat = GL_RGBA;
}
-#ifndef QT_OPENGL_ES
+#if !QT_CONFIG(opengles2)
}
#endif