From 980996234f74d578b22081020275677d7dfdadf0 Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Mon, 6 Aug 2012 11:04:35 +0100 Subject: [PATCH] Properly check for ability to use GL_REPEAT with npot textures Change-Id: I8dcc1c3f1d6959eef35a45f920bb37c08100a510 Reviewed-by: Gunnar Sletta --- src/quick/scenegraph/qsgdefaultimagenode.cpp | 2 +- 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 7da9ba4..fda4019 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 cdbef7d..e10514c 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(state.context())).hasOpenGLFeature(QOpenGLFunctions::NPOTTextures); + bool npotSupported = QOpenGLFunctions(const_cast(state.context())).hasOpenGLFeature(QOpenGLFunctions::NPOTTextureRepeat); QSize size = t->textureSize(); bool isNpot = !isPowerOfTwo(size.width()) || !isPowerOfTwo(size.height()); if (!npotSupported && isNpot) { -- 1.7.2.5