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>
This commit is contained in:
Laszlo Agocs 2014-02-17 15:33:22 +01:00 committed by The Qt Project
parent 3c50119625
commit 54d43c6480

View File

@ -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;