diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2018-06-04 10:45:14 +0200 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2018-06-04 10:45:14 +0200 |
commit | 3ca5f33c8b9c273f0169ec4c11417328f8071e97 (patch) | |
tree | 155da80482fb4593ca074f7a1bf9b22d031dba4a /src/quick/scenegraph/qsgdefaultrendercontext.cpp | |
parent | 5f4698c4e7952d64e78e3a06de5ac28d68415b19 (diff) | |
parent | b7a1bcd83a8f68185b617b860cef6f2d2d7c8d9b (diff) |
Merge remote-tracking branch 'gerrit/5.11' into wip/webassembly
Change-Id: I7556ac62fd8e1aeb99186c929f1225f02f9d2430
Diffstat (limited to 'src/quick/scenegraph/qsgdefaultrendercontext.cpp')
-rw-r--r-- | src/quick/scenegraph/qsgdefaultrendercontext.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgdefaultrendercontext.cpp b/src/quick/scenegraph/qsgdefaultrendercontext.cpp index 7882496062..22e97a2dc9 100644 --- a/src/quick/scenegraph/qsgdefaultrendercontext.cpp +++ b/src/quick/scenegraph/qsgdefaultrendercontext.cpp @@ -39,6 +39,7 @@ #include "qsgdefaultrendercontext_p.h" +#include <QtGui/QGuiApplication> #include <QtGui/QOpenGLFramebufferObject> #include <QtQuick/private/qsgbatchrenderer_p.h> @@ -317,6 +318,17 @@ QSGDefaultRenderContext *QSGDefaultRenderContext::from(QOpenGLContext *context) return qobject_cast<QSGDefaultRenderContext *>(context->property(QSG_RENDERCONTEXT_PROPERTY).value<QObject *>()); } +bool QSGDefaultRenderContext::separateIndexBuffer() const +{ + // WebGL: A given WebGLBuffer object may only be bound to one of + // the ARRAY_BUFFER or ELEMENT_ARRAY_BUFFER target in its + // lifetime. An attempt to bind a buffer object to the other + // target will generate an INVALID_OPERATION error, and the + // current binding will remain untouched. + static const bool isWebGL = qGuiApp->platformName().compare(QLatin1String("webgl")) == 0; + return isWebGL; +} + QSGDistanceFieldGlyphCache *QSGDefaultRenderContext::distanceFieldGlyphCache(const QRawFont &font) { QString key = fontKey(font); |