aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/context2d
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2017-01-30 11:08:38 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2017-01-31 13:14:02 +0000
commit7e663871e63aaf601f8483f224c33cfbe5245f4e (patch)
treedec4d31a15a682adbaa878f09ede1aea661db906 /src/quick/items/context2d
parentbdb18b54717f2f97364de811bebc14a31becf1b7 (diff)
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 <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/items/context2d')
-rw-r--r--src/quick/items/context2d/qquickcontext2dtexture.cpp7
1 files changed, 4 insertions, 3 deletions
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 <QOpenGLFramebufferObject>
#include <QOpenGLFramebufferObjectFormat>
#include <QOpenGLFunctions>
+#include <QtGui/private/qopenglextensions_p.h>
#endif
#include <QtCore/QThread>
#include <QtGui/QGuiApplication>
@@ -499,9 +500,9 @@ bool QQuickContext2DFBOTexture::doMultisampling() const
static bool multisamplingSupported = false;
if (!extensionsChecked) {
- const QSet<QByteArray> extensions = QOpenGLContext::currentContext()->extensions();
- multisamplingSupported = extensions.contains(QByteArrayLiteral("GL_EXT_framebuffer_multisample"))
- && extensions.contains(QByteArrayLiteral("GL_EXT_framebuffer_blit"));
+ QOpenGLExtensions *e = static_cast<QOpenGLExtensions *>(QOpenGLContext::currentContext()->functions());
+ multisamplingSupported = e->hasOpenGLExtension(QOpenGLExtensions::FramebufferMultisample)
+ && e->hasOpenGLExtension(QOpenGLExtensions::FramebufferBlit);
extensionsChecked = true;
}