diff options
author | Morten Johan Sørvig <morten.sorvig@qt.io> | 2020-03-10 23:56:45 +0000 |
---|---|---|
committer | Morten Johan Sørvig <morten.sorvig@qt.io> | 2020-03-24 21:08:54 +0000 |
commit | 1d5eb202b928dc7c73fc0fc4eb480817b339c68a (patch) | |
tree | 55fffafa3cb65b2f62c45bcdf6169a519caafa16 /src/plugins/platforms/wasm/qwasmopenglcontext.h | |
parent | d00f28afda79adcc106d1d953563ca03015927ca (diff) |
wasm: Add OpenGL version check
QtQuick3D probes for the supported OpenGL level by testing
multiple OpenGL versions in descending order. Context creation
must fail for versions not supported by WebGL. It does not
appear that Emscripten does this for the 3.x minor versions,
at least.
Add version check which allows OpenGL (ES) 3.0 and 2.0.
Change-Id: Ide8745dd79e69af86812a8d6f5d6cc16ecdd099a
Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmopenglcontext.h')
-rw-r--r-- | src/plugins/platforms/wasm/qwasmopenglcontext.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/platforms/wasm/qwasmopenglcontext.h b/src/plugins/platforms/wasm/qwasmopenglcontext.h index d27007e8ea..cf84379c36 100644 --- a/src/plugins/platforms/wasm/qwasmopenglcontext.h +++ b/src/plugins/platforms/wasm/qwasmopenglcontext.h @@ -51,6 +51,7 @@ public: QFunctionPointer getProcAddress(const char *procName) override; private: + static bool isOpenGLVersionSupported(QSurfaceFormat format); bool maybeCreateEmscriptenContext(QPlatformSurface *surface); static EMSCRIPTEN_WEBGL_CONTEXT_HANDLE createEmscriptenContext(const QString &canvasId, QSurfaceFormat format); |