From 7e663871e63aaf601f8483f224c33cfbe5245f4e Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 30 Jan 2017 11:08:38 +0100 Subject: Quick: Check fbo msaa related extensions via QtGui GL_EXT_xxxx is not sufficient here. QOpenGLFunctions already has support for the ANGLE and some other variants of the framebuffer multisample and blit extensions, so use that instead of the manual checks. Change-Id: I2d8e0850d3b0b9a9cfd9e55aa38adad07a0ba45d Reviewed-by: Andy Nichols --- src/quick/items/context2d/qquickcontext2dtexture.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/quick/items/context2d') diff --git a/src/quick/items/context2d/qquickcontext2dtexture.cpp b/src/quick/items/context2d/qquickcontext2dtexture.cpp index 38b5f054bf..d90f527486 100644 --- a/src/quick/items/context2d/qquickcontext2dtexture.cpp +++ b/src/quick/items/context2d/qquickcontext2dtexture.cpp @@ -48,6 +48,7 @@ #include #include #include +#include #endif #include #include @@ -499,9 +500,9 @@ bool QQuickContext2DFBOTexture::doMultisampling() const static bool multisamplingSupported = false; if (!extensionsChecked) { - const QSet extensions = QOpenGLContext::currentContext()->extensions(); - multisamplingSupported = extensions.contains(QByteArrayLiteral("GL_EXT_framebuffer_multisample")) - && extensions.contains(QByteArrayLiteral("GL_EXT_framebuffer_blit")); + QOpenGLExtensions *e = static_cast(QOpenGLContext::currentContext()->functions()); + multisamplingSupported = e->hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample) + && e->hasOpenGLExtension(QOpenGLExtensions::FramebufferBlit); extensionsChecked = true; } -- cgit v1.2.3