summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglfunctions.cpp
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer.qnx@kdab.com>2012-08-06 10:55:53 +0100
committerQt by Nokia <qt-info@nokia.com>2012-08-06 16:04:43 +0200
commit96bc8835ebbbbc545b7cefd41f01512fc0d271c1 (patch)
tree3e71f6ce236d8eb5d42f6b54a3767111c82bf922 /src/gui/opengl/qopenglfunctions.cpp
parent57265a20cba2a1d5990dffb857c9e68e58644e28 (diff)
OpenGL: Add finer-grained functionality checks for NPOT textures
The GL_IMG_texture_npot extension only provides partial support for npot textures in that it allows use of npot textures but it does not support the GL_REPEAT texture mode (needed for tiling fill modes in the QQ2 image element). Adding this new finer-grained feature check allows QQ2 to still use npot textures where GL_REPEAT is not needed with only the IMG extension present. A follow-up commit will make a check for this in qtdeclarative. Change-Id: Iff3dbdb955fb334d9e32f3abd49e90ff0ed9836c Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/gui/opengl/qopenglfunctions.cpp')
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index a5fcbd1a8a..b2728abc10 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -265,10 +265,11 @@ static int qt_gl_resolve_features()
QOpenGLFunctions::Multisample |
QOpenGLFunctions::StencilSeparate;
QOpenGLExtensionMatcher extensions;
- if (extensions.match("GL_OES_texture_npot"))
- features |= QOpenGLFunctions::NPOTTextures;
if (extensions.match("GL_IMG_texture_npot"))
features |= QOpenGLFunctions::NPOTTextures;
+ if (extensions.match("GL_OES_texture_npot"))
+ features |= QOpenGLFunctions::NPOTTextures |
+ QOpenGLFunctions::NPOTTextureRepeat;
return features;
#elif defined(QT_OPENGL_ES)
int features = QOpenGLFunctions::Multitexture |