From f9d323279a0b3928acf40d56d84e9e5cc2cb7ee9 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 24 Apr 2014 17:11:23 +0200 Subject: Rename new QOpenGLContext APIs isES() becomes isOpenGLES(). The library type enums are changed DesktopGL -> LibGL and GLES2 -> LibGLES. This removes the now unnecessary version number, the confusing "desktop" term and provides better readability. The old function/values are kept until the related qtdeclarative changes are integrated. Task-number: QTBUG-38564 Change-Id: Ibb0a1209985f1ce4bb9451f9b7b093c2b68a6505 Reviewed-by: Sean Harmer --- src/gui/opengl/qopenglengineshadermanager.cpp | 2 +- src/gui/opengl/qopenglframebufferobject.cpp | 14 ++++++------ src/gui/opengl/qopenglframebufferobject_p.h | 2 +- src/gui/opengl/qopenglfunctions.cpp | 8 +++---- src/gui/opengl/qopenglpaintengine.cpp | 8 +++---- src/gui/opengl/qopenglshaderprogram.cpp | 10 ++++----- src/gui/opengl/qopengltexture.cpp | 32 +++++++++++++-------------- src/gui/opengl/qopengltextureglyphcache.cpp | 6 ++--- src/gui/opengl/qopengltexturehelper.cpp | 6 ++--- src/gui/opengl/qopengltimerquery.cpp | 2 +- src/gui/opengl/qopenglvertexarrayobject.cpp | 4 ++-- 11 files changed, 47 insertions(+), 47 deletions(-) (limited to 'src/gui/opengl') diff --git a/src/gui/opengl/qopenglengineshadermanager.cpp b/src/gui/opengl/qopenglengineshadermanager.cpp index a1215acb7e..1c4231b79f 100644 --- a/src/gui/opengl/qopenglengineshadermanager.cpp +++ b/src/gui/opengl/qopenglengineshadermanager.cpp @@ -164,7 +164,7 @@ QOpenGLEngineSharedShaders::QOpenGLEngineSharedShaders(QOpenGLContext* context) code[NonPremultipliedImageSrcFragmentShader] = qopenglslNonPremultipliedImageSrcFragmentShader; code[CustomImageSrcFragmentShader] = qopenglslCustomSrcFragmentShader; // Calls "customShader", which must be appended code[SolidBrushSrcFragmentShader] = qopenglslSolidBrushSrcFragmentShader; - if (context->isES()) + if (context->isOpenGLES()) code[TextureBrushSrcFragmentShader] = qopenglslTextureBrushSrcFragmentShader_ES; else code[TextureBrushSrcFragmentShader] = qopenglslTextureBrushSrcFragmentShader_desktop; diff --git a/src/gui/opengl/qopenglframebufferobject.cpp b/src/gui/opengl/qopenglframebufferobject.cpp index 92a7330d6c..cc829df950 100644 --- a/src/gui/opengl/qopenglframebufferobject.cpp +++ b/src/gui/opengl/qopenglframebufferobject.cpp @@ -590,7 +590,7 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen funcs.glBindRenderbuffer(GL_RENDERBUFFER, depth_buffer); Q_ASSERT(funcs.glIsRenderbuffer(depth_buffer)); if (samples != 0 && funcs.hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample)) { - if (ctx->isES()) { + if (ctx->isOpenGLES()) { if (funcs.hasOpenGLExtension(QOpenGLExtensions::Depth24)) funcs.glRenderbufferStorageMultisample(GL_RENDERBUFFER, samples, GL_DEPTH_COMPONENT24, size.width(), size.height()); @@ -602,7 +602,7 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen GL_DEPTH_COMPONENT, size.width(), size.height()); } } else { - if (ctx->isES()) { + if (ctx->isOpenGLES()) { if (funcs.hasOpenGLExtension(QOpenGLExtensions::Depth24)) { funcs.glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH_COMPONENT24, size.width(), size.height()); @@ -631,7 +631,7 @@ void QOpenGLFramebufferObjectPrivate::initAttachments(QOpenGLContext *ctx, QOpen #ifdef QT_OPENGL_ES GLenum storage = GL_STENCIL_INDEX8; #else - GLenum storage = ctx->isES() ? GL_STENCIL_INDEX8 : GL_STENCIL_INDEX; + GLenum storage = ctx->isOpenGLES() ? GL_STENCIL_INDEX8 : GL_STENCIL_INDEX; #endif if (samples != 0 && funcs.hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample)) @@ -773,7 +773,7 @@ QOpenGLFramebufferObject::QOpenGLFramebufferObject(const QSize &size, GLenum tar Q_D(QOpenGLFramebufferObject); d->init(this, size, NoAttachment, target, #ifndef QT_OPENGL_ES_2 - QOpenGLContext::currentContext()->isES() ? GL_RGBA : GL_RGBA8 + QOpenGLContext::currentContext()->isOpenGLES() ? GL_RGBA : GL_RGBA8 #else GL_RGBA #endif @@ -793,7 +793,7 @@ QOpenGLFramebufferObject::QOpenGLFramebufferObject(int width, int height, GLenum Q_D(QOpenGLFramebufferObject); d->init(this, QSize(width, height), NoAttachment, target, #ifndef QT_OPENGL_ES_2 - QOpenGLContext::currentContext()->isES() ? GL_RGBA : GL_RGBA8 + QOpenGLContext::currentContext()->isOpenGLES() ? GL_RGBA : GL_RGBA8 #else GL_RGBA #endif @@ -850,7 +850,7 @@ QOpenGLFramebufferObject::QOpenGLFramebufferObject(int width, int height, Attach #ifdef QT_OPENGL_ES_2 internal_format = GL_RGBA; #else - internal_format = QOpenGLContext::currentContext()->isES() ? GL_RGBA : GL_RGBA8; + internal_format = QOpenGLContext::currentContext()->isOpenGLES() ? GL_RGBA : GL_RGBA8; #endif d->init(this, QSize(width, height), attachment, target, internal_format); } @@ -877,7 +877,7 @@ QOpenGLFramebufferObject::QOpenGLFramebufferObject(const QSize &size, Attachment #ifdef QT_OPENGL_ES_2 internal_format = GL_RGBA; #else - internal_format = QOpenGLContext::currentContext()->isES() ? GL_RGBA : GL_RGBA8; + internal_format = QOpenGLContext::currentContext()->isOpenGLES() ? GL_RGBA : GL_RGBA8; #endif d->init(this, size, attachment, target, internal_format); } diff --git a/src/gui/opengl/qopenglframebufferobject_p.h b/src/gui/opengl/qopenglframebufferobject_p.h index bd830b38e9..7a653bc16d 100644 --- a/src/gui/opengl/qopenglframebufferobject_p.h +++ b/src/gui/opengl/qopenglframebufferobject_p.h @@ -74,7 +74,7 @@ public: // context, so we need a fallback just to be safe, even though in pratice there // will usually be a context current. QOpenGLContext *ctx = QOpenGLContext::currentContext(); - const bool isES = ctx ? ctx->isES() : QOpenGLContext::openGLModuleType() != QOpenGLContext::DesktopGL; + const bool isES = ctx ? ctx->isOpenGLES() : QOpenGLContext::openGLModuleType() != QOpenGLContext::LibGL; internal_format = isES ? GL_RGBA : GL_RGBA8; #else internal_format = GL_RGBA; diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp index 85b893e434..bcb38ce7f1 100644 --- a/src/gui/opengl/qopenglfunctions.cpp +++ b/src/gui/opengl/qopenglfunctions.cpp @@ -256,7 +256,7 @@ QOpenGLExtensions::QOpenGLExtensions(QOpenGLContext *context) static int qt_gl_resolve_features() { QOpenGLContext *ctx = QOpenGLContext::currentContext(); - if (ctx->isES()) { + if (ctx->isOpenGLES()) { // OpenGL ES 2 int features = QOpenGLFunctions::Multitexture | QOpenGLFunctions::Shaders | @@ -367,7 +367,7 @@ static int qt_gl_resolve_extensions() if (extensionMatcher.match("GL_ARB_pixel_buffer_object")) extensions |= QOpenGLExtensions::PixelBufferObject; - if (ctx->isES()) { + if (ctx->isOpenGLES()) { if (format.majorVersion() >= 2) extensions |= QOpenGLExtensions::GenerateMipmap; if (extensionMatcher.match("GL_OES_mapbuffer")) @@ -2415,7 +2415,7 @@ static void QOPENGLF_APIENTRY qopenglfResolveClearColor(GLclampf red, GLclampf g static void QOPENGLF_APIENTRY qopenglfResolveClearDepthf(GLclampf depth) { - if (QOpenGLContext::currentContext()->isES()) { + if (QOpenGLContext::currentContext()->isOpenGLES()) { RESOLVE_FUNC_VOID(0, ClearDepthf)(depth); } else { RESOLVE_FUNC_VOID(0, ClearDepth)((GLdouble) depth); @@ -2464,7 +2464,7 @@ static void QOPENGLF_APIENTRY qopenglfResolveDepthMask(GLboolean flag) static void QOPENGLF_APIENTRY qopenglfResolveDepthRangef(GLclampf zNear, GLclampf zFar) { - if (QOpenGLContext::currentContext()->isES()) { + if (QOpenGLContext::currentContext()->isOpenGLES()) { RESOLVE_FUNC_VOID(0, DepthRangef)(zNear, zFar); } else { RESOLVE_FUNC_VOID(0, DepthRange)((GLdouble) zNear, (GLdouble) zFar); diff --git a/src/gui/opengl/qopenglpaintengine.cpp b/src/gui/opengl/qopenglpaintengine.cpp index f160b340e0..81a0d82c99 100644 --- a/src/gui/opengl/qopenglpaintengine.cpp +++ b/src/gui/opengl/qopenglpaintengine.cpp @@ -221,7 +221,7 @@ void QOpenGL2PaintEngineExPrivate::updateBrushTexture() currentBrushPixmap = currentBrushPixmap.scaled(max_texture_size, max_texture_size, Qt::KeepAspectRatio); GLuint wrapMode = GL_REPEAT; - if (QOpenGLContext::currentContext()->isES()) { + if (QOpenGLContext::currentContext()->isOpenGLES()) { // OpenGL ES does not support GL_REPEAT wrap modes for NPOT textures. So instead, // we emulate GL_REPEAT by only taking the fractional part of the texture coords // in the qopenglslTextureBrushSrcFragmentShader program. @@ -598,7 +598,7 @@ void QOpenGL2PaintEngineExPrivate::resetGLState() setVertexAttribArrayEnabled(QT_TEXTURE_COORDS_ATTR, false); setVertexAttribArrayEnabled(QT_VERTEX_COORDS_ATTR, false); setVertexAttribArrayEnabled(QT_OPACITY_ATTR, false); - if (!QOpenGLContext::currentContext()->isES()) { + if (!QOpenGLContext::currentContext()->isOpenGLES()) { // gl_Color, corresponding to vertex attribute 3, may have been changed float color[] = { 1.0f, 1.0f, 1.0f, 1.0f }; funcs.glVertexAttrib4fv(3, color); @@ -1333,7 +1333,7 @@ void QOpenGL2PaintEngineEx::renderHintsChanged() state()->renderHintsChanged = true; #ifndef QT_OPENGL_ES_2 - if (!QOpenGLContext::currentContext()->isES()) { + if (!QOpenGLContext::currentContext()->isOpenGLES()) { Q_D(QOpenGL2PaintEngineEx); if ((state()->renderHints & QPainter::Antialiasing) || (state()->renderHints & QPainter::HighQualityAntialiasing)) @@ -2011,7 +2011,7 @@ bool QOpenGL2PaintEngineEx::begin(QPaintDevice *pdev) d->glyphCacheFormat = QFontEngine::Format_A8; #ifndef QT_OPENGL_ES_2 - if (!QOpenGLContext::currentContext()->isES()) { + if (!QOpenGLContext::currentContext()->isOpenGLES()) { d->funcs.glDisable(GL_MULTISAMPLE); d->glyphCacheFormat = QFontEngine::Format_A32; d->multisamplingAlwaysEnabled = false; diff --git a/src/gui/opengl/qopenglshaderprogram.cpp b/src/gui/opengl/qopenglshaderprogram.cpp index bfde270446..c4862945bb 100644 --- a/src/gui/opengl/qopenglshaderprogram.cpp +++ b/src/gui/opengl/qopenglshaderprogram.cpp @@ -176,7 +176,7 @@ public: #endif { #ifndef QT_OPENGL_ES_2 - if (!ctx->isES()) { + if (!ctx->isOpenGLES()) { QSurfaceFormat f = ctx->format(); // Geometry shaders require OpenGL >= 3.2 @@ -445,7 +445,7 @@ bool QOpenGLShader::compileSourceCode(const char *source) #ifdef QOpenGL_REDEFINE_HIGHP if (d->shaderType == Fragment && !ctx_d->workaround_missingPrecisionQualifiers - && QOpenGLContext::currentContext()->isES()) { + && QOpenGLContext::currentContext()->isOpenGLES()) { src.append(redefineHighp); srclen.append(GLint(sizeof(redefineHighp) - 1)); } @@ -674,7 +674,7 @@ bool QOpenGLShaderProgram::init() #ifndef QT_OPENGL_ES_2 // Resolve OpenGL 4 functions for tessellation shader support QSurfaceFormat format = context->format(); - if (!context->isES() + if (!context->isOpenGLES() && format.version() >= qMakePair(4, 0)) { d->tessellationFuncs = context->versionFunctions(); d->tessellationFuncs->initializeOpenGLFunctions(); @@ -3280,7 +3280,7 @@ bool QOpenGLShader::hasOpenGLShaders(ShaderType type, QOpenGLContext *context) #ifndef QT_OPENGL_ES_2 // Geometry shaders require OpenGL 3.2 or newer QSurfaceFormat format = context->format(); - return (!context->isES()) + return (!context->isOpenGLES()) && (format.version() >= qMakePair(3, 2)); #else // No geometry shader support in OpenGL ES2 @@ -3288,7 +3288,7 @@ bool QOpenGLShader::hasOpenGLShaders(ShaderType type, QOpenGLContext *context) #endif } else if (type == TessellationControl || type == TessellationEvaluation) { #if !defined(QT_OPENGL_ES_2) - return (!context->isES()) + return (!context->isOpenGLES()) && (format.version() >= qMakePair(4, 0)); #else // No tessellation shader support in OpenGL ES2 diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp index 078274eabd..445e3ed64e 100644 --- a/src/gui/opengl/qopengltexture.cpp +++ b/src/gui/opengl/qopengltexture.cpp @@ -2432,7 +2432,7 @@ bool QOpenGLTexture::hasFeature(Feature feature) bool supported = false; #if !defined(QT_OPENGL_ES_2) - if (!ctx->isES()) { + if (!ctx->isOpenGLES()) { switch (feature) { case ImmutableMultisampleStorage: case TextureBuffer: @@ -2489,7 +2489,7 @@ bool QOpenGLTexture::hasFeature(Feature feature) } } - if (ctx->isES()) + if (ctx->isOpenGLES()) #endif { switch (feature) { @@ -2524,7 +2524,7 @@ bool QOpenGLTexture::hasFeature(Feature feature) void QOpenGLTexture::setMipBaseLevel(int baseLevel) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLContext::currentContext()->isES()) { + if (!QOpenGLContext::currentContext()->isOpenGLES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->textureId); @@ -2561,7 +2561,7 @@ int QOpenGLTexture::mipBaseLevel() const void QOpenGLTexture::setMipMaxLevel(int maxLevel) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLContext::currentContext()->isES()) { + if (!QOpenGLContext::currentContext()->isOpenGLES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->textureId); @@ -2598,7 +2598,7 @@ int QOpenGLTexture::mipMaxLevel() const void QOpenGLTexture::setMipLevelRange(int baseLevel, int maxLevel) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLContext::currentContext()->isES()) { + if (!QOpenGLContext::currentContext()->isOpenGLES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->textureId); @@ -2708,7 +2708,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 (!QOpenGLContext::currentContext()->isES()) { + if (!QOpenGLContext::currentContext()->isOpenGLES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -2737,7 +2737,7 @@ void QOpenGLTexture::setSwizzleMask(SwizzleValue r, SwizzleValue g, SwizzleValue b, SwizzleValue a) { #if !defined(Q_OS_MAC) && !defined(QT_OPENGL_ES_2) - if (!QOpenGLContext::currentContext()->isES()) { + if (!QOpenGLContext::currentContext()->isOpenGLES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -2786,7 +2786,7 @@ QOpenGLTexture::SwizzleValue QOpenGLTexture::swizzleMask(SwizzleComponent compon void QOpenGLTexture::setDepthStencilMode(QOpenGLTexture::DepthStencilMode mode) { #if !defined(Q_OS_MAC) && !defined(QT_OPENGL_ES_2) - if (!QOpenGLContext::currentContext()->isES()) { + if (!QOpenGLContext::currentContext()->isOpenGLES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -2977,7 +2977,7 @@ QOpenGLTexture::WrapMode QOpenGLTexture::wrapMode(QOpenGLTexture::CoordinateDire void QOpenGLTexture::setBorderColor(QColor color) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLContext::currentContext()->isES()) { + if (!QOpenGLContext::currentContext()->isOpenGLES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -3007,7 +3007,7 @@ void QOpenGLTexture::setBorderColor(QColor color) void QOpenGLTexture::setBorderColor(float r, float g, float b, float a) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLContext::currentContext()->isES()) { + if (!QOpenGLContext::currentContext()->isOpenGLES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -3040,7 +3040,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 (!QOpenGLContext::currentContext()->isES()) { + if (!QOpenGLContext::currentContext()->isOpenGLES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -3075,7 +3075,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 (!QOpenGLContext::currentContext()->isES()) { + if (!QOpenGLContext::currentContext()->isOpenGLES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -3187,7 +3187,7 @@ void QOpenGLTexture::borderColor(unsigned int *border) const void QOpenGLTexture::setMinimumLevelOfDetail(float value) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLContext::currentContext()->isES()) { + if (!QOpenGLContext::currentContext()->isOpenGLES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -3224,7 +3224,7 @@ float QOpenGLTexture::minimumLevelOfDetail() const void QOpenGLTexture::setMaximumLevelOfDetail(float value) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLContext::currentContext()->isES()) { + if (!QOpenGLContext::currentContext()->isOpenGLES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -3260,7 +3260,7 @@ float QOpenGLTexture::maximumLevelOfDetail() const void QOpenGLTexture::setLevelOfDetailRange(float min, float max) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLContext::currentContext()->isES()) { + if (!QOpenGLContext::currentContext()->isOpenGLES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); @@ -3302,7 +3302,7 @@ QPair QOpenGLTexture::levelOfDetailRange() const void QOpenGLTexture::setLevelofDetailBias(float bias) { #if !defined(QT_OPENGL_ES_2) - if (!QOpenGLContext::currentContext()->isES()) { + if (!QOpenGLContext::currentContext()->isOpenGLES()) { Q_D(QOpenGLTexture); d->create(); Q_ASSERT(d->texFuncs); diff --git a/src/gui/opengl/qopengltextureglyphcache.cpp b/src/gui/opengl/qopengltextureglyphcache.cpp index 3287bbb972..ac88d9d3a5 100644 --- a/src/gui/opengl/qopengltextureglyphcache.cpp +++ b/src/gui/opengl/qopengltextureglyphcache.cpp @@ -369,7 +369,7 @@ void QOpenGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed || mask.format() == QImage::Format_ARGB32_Premultiplied #else || (mask.format() == QImage::Format_ARGB32_Premultiplied - && ctx->isES()) + && ctx->isOpenGLES()) #endif ) { for (int y = 0; y < maskHeight; ++y) { @@ -387,7 +387,7 @@ void QOpenGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed src[x] = qRgba(r, g, b, avg); // swizzle the bits to accommodate for the GL_RGBA upload. #if Q_BYTE_ORDER != Q_BIG_ENDIAN - if (ctx->isES()) + if (ctx->isOpenGLES()) #endif src[x] = ARGB2RGBA(src[x]); } @@ -400,7 +400,7 @@ void QOpenGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed #ifdef QT_OPENGL_ES_2 GLenum fmt = GL_RGBA; #else - GLenum fmt = ctx->isES() ? GL_RGBA : GL_BGRA; + GLenum fmt = ctx->isOpenGLES() ? GL_RGBA : GL_BGRA; #endif // QT_OPENGL_ES_2 #if Q_BYTE_ORDER == Q_BIG_ENDIAN diff --git a/src/gui/opengl/qopengltexturehelper.cpp b/src/gui/opengl/qopengltexturehelper.cpp index 1d31fb5605..27aece8eca 100644 --- a/src/gui/opengl/qopengltexturehelper.cpp +++ b/src/gui/opengl/qopengltexturehelper.cpp @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context) { // Resolve EXT_direct_state_access entry points if present - if (!context->isES() + if (!context->isOpenGLES() && context->hasExtension(QByteArrayLiteral("GL_EXT_direct_state_access"))) { TextureParameteriEXT = reinterpret_cast(context->getProcAddress(QByteArrayLiteral("glTextureParameteriEXT"))); TextureParameterivEXT = reinterpret_cast(context->getProcAddress(QByteArrayLiteral("glTextureParameterivEXT"))); @@ -121,7 +121,7 @@ QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context) } // Some DSA functions are part of NV_texture_multisample instead - if (!context->isES() + if (!context->isOpenGLES() && context->hasExtension(QByteArrayLiteral("GL_NV_texture_multisample"))) { TextureImage3DMultisampleNV = reinterpret_cast(context->getProcAddress(QByteArrayLiteral("glTextureImage3DMultisampleNV"))); TextureImage2DMultisampleNV = reinterpret_cast(context->getProcAddress(QByteArrayLiteral("glTextureImage2DMultisampleNV"))); @@ -190,7 +190,7 @@ QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context) TexSubImage1D = reinterpret_cast(context->getProcAddress(QByteArrayLiteral("glTexSubImage1D"))); #endif - if (context->isES() && context->hasExtension(QByteArrayLiteral("GL_OES_texture_3D"))) { + if (context->isOpenGLES() && context->hasExtension(QByteArrayLiteral("GL_OES_texture_3D"))) { TexImage3D = reinterpret_cast(context->getProcAddress(QByteArrayLiteral("glTexImage3DOES"))); TexSubImage3D = reinterpret_cast(context->getProcAddress(QByteArrayLiteral("glTexSubImage3DOES"))); CompressedTexImage3D = reinterpret_cast(context->getProcAddress(QByteArrayLiteral("glCompressedTexImage3DOES"))); diff --git a/src/gui/opengl/qopengltimerquery.cpp b/src/gui/opengl/qopengltimerquery.cpp index 908a9cee07..5159ec58fc 100644 --- a/src/gui/opengl/qopengltimerquery.cpp +++ b/src/gui/opengl/qopengltimerquery.cpp @@ -135,7 +135,7 @@ bool QOpenGLTimerQueryPrivate::create() return false; } - if (context->isES()) { + if (context->isOpenGLES()) { qWarning("QOpenGLTimerQuery: Not supported on OpenGL ES"); return false; } diff --git a/src/gui/opengl/qopenglvertexarrayobject.cpp b/src/gui/opengl/qopenglvertexarrayobject.cpp index 9dfd5b2a6f..5ebfc9a9c8 100644 --- a/src/gui/opengl/qopenglvertexarrayobject.cpp +++ b/src/gui/opengl/qopenglvertexarrayobject.cpp @@ -60,7 +60,7 @@ public: QVertexArrayObjectHelper(QOpenGLContext *context) { Q_ASSERT(context); - if (context->isES()) { + if (context->isOpenGLES()) { GenVertexArrays = reinterpret_cast(context->getProcAddress(QByteArrayLiteral("glGenVertexArraysOES"))); DeleteVertexArrays = reinterpret_cast(context->getProcAddress(QByteArrayLiteral("glDeleteVertexArraysOES"))); BindVertexArray = reinterpret_cast(context->getProcAddress(QByteArrayLiteral("glBindVertexArrayOES"))); @@ -159,7 +159,7 @@ bool QOpenGLVertexArrayObjectPrivate::create() context = ctx; QObject::connect(context, SIGNAL(aboutToBeDestroyed()), q, SLOT(_q_contextAboutToBeDestroyed())); - if (ctx->isES()) { + if (ctx->isOpenGLES()) { if (ctx->hasExtension(QByteArrayLiteral("GL_OES_vertex_array_object"))) { vaoFuncs.helper = new QVertexArrayObjectHelper(ctx); vaoFuncsType = OES; -- cgit v1.2.3