diff options
author | Michael Brasser <mbrasser@ford.com> | 2019-01-14 13:00:06 -0600 |
---|---|---|
committer | Michael Brasser <michael.brasser@live.com> | 2019-01-15 19:39:41 +0000 |
commit | a7fa2618e4c8f10927a01d415d96ee783cf4348d (patch) | |
tree | 47e9bc22eb7c7a211a13d25ee505fc3e6b58116c | |
parent | eabef55b8bd61b8693c4ed61c667bb0bbade0904 (diff) |
Update QOpenGLTexture::generateMipMaps for ES 3
Per the Khronos documentation, this operation is not permitted on ES 3.
Change-Id: Iff70ef83d48228277b883df588011432ba80f4bd
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
-rw-r--r-- | src/gui/opengl/qopengltexture.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp index cea4b51a5c..5b7956d31e 100644 --- a/src/gui/opengl/qopengltexture.cpp +++ b/src/gui/opengl/qopengltexture.cpp @@ -3914,8 +3914,7 @@ bool QOpenGLTexture::isAutoMipMapGenerationEnabled() const have disabled automatic mipmap generation then you need to call this function or the overload to create the mipmap chain. - \note Mipmap generation is not supported for compressed textures with OpenGL - ES 2.0. + \note Mipmap generation is not supported for compressed textures with OpenGL ES. \sa setAutoMipMapGenerationEnabled(), setMipLevels(), mipLevels() */ @@ -3926,7 +3925,7 @@ void QOpenGLTexture::generateMipMaps() Q_ASSERT(d->textureId); if (isCompressedFormat(d->format)) { if (QOpenGLContext *ctx = QOpenGLContext::currentContext()) - if (ctx->isOpenGLES() && ctx->format().majorVersion() < 3) + if (ctx->isOpenGLES()) return; } d->texFuncs->glGenerateTextureMipmap(d->textureId, d->target, d->bindingTarget); @@ -3951,7 +3950,7 @@ void QOpenGLTexture::generateMipMaps(int baseLevel, bool resetBaseLevel) Q_ASSERT(d->textureId); if (isCompressedFormat(d->format)) { if (QOpenGLContext *ctx = QOpenGLContext::currentContext()) - if (ctx->isOpenGLES() && ctx->format().majorVersion() < 3) + if (ctx->isOpenGLES()) return; } int oldBaseLevel; |