From 9e5765fba0c2986d4fb4f7103f2f9c72f4c0d20d Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Tue, 1 Jul 2014 20:57:42 +0200 Subject: QOpenGLTexture: fix the feature test for Buffer Textures 1a4ff6f122f575aca21f6a0b9d9c14cac4a5ea66 modified the features test by checking extensions as well as the GL version. The problem was that the GL version was wrong in the first place -- buffer textures are natively supported since OpenGL 3.0, not 4.3. 4.3 introduced support for buffer texture ranges, i.e. ARB_texture_buffer_range; however it's pointless to take the highest requirement, especially considering that so far QOpenGLTexture doesn't wrap glTexBuffer(Range) in any way. In the future, if QOpenGLTexture will also wrap glTexBuffer, then we will also be able to introduce a different feature flag for testing buffer texture ranges. Change-Id: I6becbd49ac26d44ce01d088cbb7831b5cc127bdb Reviewed-by: Sean Harmer Reviewed-by: Paul Lemire --- src/gui/opengl/qopengltexture.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gui/opengl/qopengltexture.cpp b/src/gui/opengl/qopengltexture.cpp index 6e2e72a3b4..e0e1c72a6c 100644 --- a/src/gui/opengl/qopengltexture.cpp +++ b/src/gui/opengl/qopengltexture.cpp @@ -2446,9 +2446,8 @@ bool QOpenGLTexture::hasFeature(Feature feature) break; case TextureBuffer: - supported = f.version() >= qMakePair(4, 3) - || (ctx->hasExtension(QByteArrayLiteral("GL_ARB_texture_buffer_object")) - && ctx->hasExtension(QByteArrayLiteral("GL_ARB_texture_buffer_range"))); + supported = f.version() >= qMakePair(3, 0) + || ctx->hasExtension(QByteArrayLiteral("GL_ARB_texture_buffer_object")); break; case StencilTexturing: -- cgit v1.2.3