diff options
author | Sean Harmer <sean.harmer.qnx@kdab.com> | 2012-08-06 11:04:35 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-07 00:02:15 +0200 |
commit | 980996234f74d578b22081020275677d7dfdadf0 (patch) | |
tree | 0cae5c71d46ee73cf310abf23af29630476a07ad /src/quick/scenegraph | |
parent | 7968bd306d182d244a73682aebdb9e74edbc6304 (diff) |
Properly check for ability to use GL_REPEAT with npot textures
Change-Id: I8dcc1c3f1d6959eef35a45f920bb37c08100a510
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r-- | src/quick/scenegraph/qsgdefaultimagenode.cpp | 2 | ||||
-rw-r--r-- | src/quick/scenegraph/util/qsgtexturematerial.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/scenegraph/qsgdefaultimagenode.cpp b/src/quick/scenegraph/qsgdefaultimagenode.cpp index 7da9ba4ca1..fda4019c30 100644 --- a/src/quick/scenegraph/qsgdefaultimagenode.cpp +++ b/src/quick/scenegraph/qsgdefaultimagenode.cpp @@ -411,7 +411,7 @@ void QSGDefaultImageNode::updateGeometry() #ifdef QT_OPENGL_ES_2 QOpenGLContext *ctx = QOpenGLContext::currentContext(); - bool npotSupported = ctx->functions()->hasOpenGLFeature(QOpenGLFunctions::NPOTTextures); + bool npotSupported = ctx->functions()->hasOpenGLFeature(QOpenGLFunctions::NPOTTextureRepeat); QSize size = t->textureSize(); bool isNpot = !isPowerOfTwo(size.width()) || !isPowerOfTwo(size.height()); bool wrapSupported = npotSupported || !isNpot; diff --git a/src/quick/scenegraph/util/qsgtexturematerial.cpp b/src/quick/scenegraph/util/qsgtexturematerial.cpp index cdbef7d88f..e10514ca0a 100644 --- a/src/quick/scenegraph/util/qsgtexturematerial.cpp +++ b/src/quick/scenegraph/util/qsgtexturematerial.cpp @@ -103,7 +103,7 @@ void QSGOpaqueTextureMaterialShader::updateState(const RenderState &state, QSGMa t->setFiltering(tx->filtering()); #ifdef QT_OPENGL_ES_2 - bool npotSupported = QOpenGLFunctions(const_cast<QOpenGLContext *>(state.context())).hasOpenGLFeature(QOpenGLFunctions::NPOTTextures); + bool npotSupported = QOpenGLFunctions(const_cast<QOpenGLContext *>(state.context())).hasOpenGLFeature(QOpenGLFunctions::NPOTTextureRepeat); QSize size = t->textureSize(); bool isNpot = !isPowerOfTwo(size.width()) || !isPowerOfTwo(size.height()); if (!npotSupported && isNpot) { |