From 54d43c6480ff033ad80165a2da02d2e01f708cf4 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 17 Feb 2014 15:33:22 +0100 Subject: [PATCH] Expose NPOTTextureRepeat in QOpenGLFunctions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Friedemann Kleint Reviewed-by: Gunnar Sletta --- src/gui/opengl/qopenglfunctions.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp index 150e7dcb321..60743b3a277 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;