summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-02-17 15:33:22 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-21 15:53:48 +0100
commit54d43c6480ff033ad80165a2da02d2e01f708cf4 (patch)
tree9f01915ee250767d03fbf27929bfdd49706a6649 /src/gui/opengl
parent3c50119625fec9c0a1e6d056f6f7e9f59e730c36 (diff)
Expose NPOTTextureRepeat in QOpenGLFunctions
Desktop GL 2.0 and higher supports GL_REPEAT on non-power-of-two textures. GL_ARB_texture_non_power_of_two mentions this explicitly in issue #8. Change-Id: Ia7f3b412b39cca4bec8a6caec3b1281b4c29ab75 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Diffstat (limited to 'src/gui/opengl')
-rw-r--r--src/gui/opengl/qopenglfunctions.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp
index 150e7dcb32..60743b3a27 100644
--- a/src/gui/opengl/qopenglfunctions.cpp
+++ b/src/gui/opengl/qopenglfunctions.cpp
@@ -314,7 +314,8 @@ static int qt_gl_resolve_features()
if (extensions.match("GL_ARB_multisample"))
features |= QOpenGLFunctions::Multisample;
if (extensions.match("GL_ARB_texture_non_power_of_two"))
- features |= QOpenGLFunctions::NPOTTextures;
+ features |= QOpenGLFunctions::NPOTTextures |
+ QOpenGLFunctions::NPOTTextureRepeat;
// assume version 2.0 or higher
features |= QOpenGLFunctions::BlendColor |
@@ -327,7 +328,8 @@ static int qt_gl_resolve_features()
QOpenGLFunctions::Shaders |
QOpenGLFunctions::StencilSeparate |
QOpenGLFunctions::BlendEquationSeparate |
- QOpenGLFunctions::NPOTTextures;
+ QOpenGLFunctions::NPOTTextures |
+ QOpenGLFunctions::NPOTTextureRepeat;
if (format.majorVersion() >= 3)
features |= QOpenGLFunctions::Framebuffers;