From 9c5d4d5f8ea63411a02d705c7dfb99f325189a79 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 24 Nov 2022 10:12:25 +0000 Subject: Doc: WebAssembly: Update 'OpenGL and WebGL' section Remove paragraph about mixing raster and OpenGL not being supported as the related bug has been fixed. Improve formatting and sentence structure. Fixes: QTBUG-108670 Change-Id: I2100c1a5710da8564a205801a96f5c17f228f06c Reviewed-by: Lorn Potter (cherry picked from commit 457ea10472407fc5e27912b1e7b7f0cab3de237e) Reviewed-by: Qt Cherry-pick Bot --- doc/src/platforms/wasm.qdoc | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/doc/src/platforms/wasm.qdoc b/doc/src/platforms/wasm.qdoc index cf886c68..46bb3bf1 100644 --- a/doc/src/platforms/wasm.qdoc +++ b/doc/src/platforms/wasm.qdoc @@ -321,24 +321,30 @@ Qt detects WebGL as OpenGL ES, with the following version mapping: \endtable OpengL ES 2 is selected by default, OpenGL ES 3 can be enabled by configuring Qt with -the -feature-opengles3 option. +the \c {-feature-opengles3} option. -Qt for WebAssembly does not support mixing raster and OpenGL content. Supported -use cases are pure raster apps using QWigets, and pure OpenGL apps using -Qt Quick or QOpenGLWindow. QOpenGLWidget is not supported at this point (QTBUG-66944). +Web and Desktop OpenGL differences are documented in +\l {https://www.khronos.org/registry/webgl/specs/latest/1.0/#6} +{WebGL and OpenGL Differences}. +There are additional differences between WebGL 1.0 and WebGL 2.0, +documented in the \l {https://www.khronos.org/registry/webgl/specs/latest/2.0} +{WebGL 2.0 Specification}. -Web and Desktop OpenGL differences are documented in: -\l {https://www.khronos.org/registry/webgl/specs/latest/1.0/#6}{WebGL and OpenGL Differences} -There are additional differences between WebGL 1.0 and WebGL 2.0 which are documented in: -\l {https://www.khronos.org/registry/webgl/specs/latest/2.0}{WebGL 2.0 Specification} +A WebGL-friendly subset of ES2 (and ES3) is used by default. If you need to use +\c glDrawArrays and \c glDrawElements without bound buffers, you can enable full +ES2 support by adding + +\badcode +target_link_options( PRIVATE "SHELL:-s FULL_ES2=1") +\endcode - A WebGL-friendly subset of ES2 (and ES3) is used by default. If you need to use - glDrawArrays and glDrawElements without bound buffers, you can enable full - ES2 support by adding - target_link_options( PRIVATE "SHELL:-s FULL_ES2=1") and/or full ES3 emulation by adding - target_link_options( PRIVATE "SHELL:-s FULL_ES3=1") -to your projects CMakeFiles.txt + +\badcode +target_link_options( PRIVATE "SHELL:-s FULL_ES3=1") +\endcode + +to your project's \c {CMakeFiles.txt}. \section2 Multithreading -- cgit v1.2.1