diff options
Diffstat (limited to 'src/gui/opengl/qopenglfunctions.cpp')
| -rw-r--r-- | src/gui/opengl/qopenglfunctions.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp index 7eef9956b65..6b45d26fb4c 100644 --- a/src/gui/opengl/qopenglfunctions.cpp +++ b/src/gui/opengl/qopenglfunctions.cpp @@ -234,11 +234,17 @@ static int qt_gl_resolve_features() QOpenGLFunctions::CompressedTextures | QOpenGLFunctions::Multisample | QOpenGLFunctions::StencilSeparate; - if (extensions.match("GL_IMG_texture_npot")) - features |= QOpenGLFunctions::NPOTTextures; - if (extensions.match("GL_OES_texture_npot")) + + if (ctx->format().majorVersion() >= 3) { features |= QOpenGLFunctions::NPOTTextures | QOpenGLFunctions::NPOTTextureRepeat; + } else { + if (extensions.match("GL_IMG_texture_npot")) + features |= QOpenGLFunctions::NPOTTextures; + if (extensions.match("GL_OES_texture_npot")) + features |= QOpenGLFunctions::NPOTTextures | + QOpenGLFunctions::NPOTTextureRepeat; + } if (ctx->format().majorVersion() >= 3 || extensions.match("GL_EXT_texture_rg")) features |= QOpenGLFunctions::TextureRGFormats; if (ctx->format().majorVersion() >= 3) { |
