summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorLorn Potter <lorn.potter@gmail.com>2022-06-20 16:19:32 +1000
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-06-22 04:12:42 +0000
commitff8e23973dbd4b4a821f7d63f0aafbe9350e6b0b (patch)
tree33901ec228c2b97dce4279a774d7a02e5acbd45e /cmake
parentcb527373698236f82837c236d83551cd1253c689 (diff)
wasm: Optimize use of opengles
- USE_WEBGL2 is depreciated, Emscripten now uses MAX_WEBGL_VERSION - Optimize and remove use of emulated ES2 and ES3, which means only use WebGL friendly subset. Users can add USE_ES3=1 and USE_ES2=1 to the final linker arguments for those respective versions in order to enable using glDrawArrays and glDrawElements with unbound buffers. See https://emscripten.org/docs/porting/multimedia_and_graphics/OpenGL-support.html Change-Id: I11ae359966964b3e7aa6e61ccc714c2bfbf61f96 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> (cherry picked from commit 1e2d67152fe2c32112b721f68983eeb30825daee) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/QtWasmHelpers.cmake12
1 files changed, 1 insertions, 11 deletions
diff --git a/cmake/QtWasmHelpers.cmake b/cmake/QtWasmHelpers.cmake
index b7ed8a1582..d17eb826b1 100644
--- a/cmake/QtWasmHelpers.cmake
+++ b/cmake/QtWasmHelpers.cmake
@@ -5,7 +5,7 @@ function (qt_internal_setup_wasm_target_properties wasmTarget)
target_link_options("${wasmTarget}" INTERFACE
"SHELL:-s ERROR_ON_UNDEFINED_SYMBOLS=1"
"SHELL:-s EXPORTED_RUNTIME_METHODS=[UTF16ToString,stringToUTF16]"
- "SHELL:-s USE_WEBGL2=1"
+ "SHELL:-s MAX_WEBGL_VERSION=2"
"SHELL:-s FETCH=1"
"SHELL:-s WASM_BIGINT=1")
@@ -25,16 +25,6 @@ function (qt_internal_setup_wasm_target_properties wasmTarget)
target_compile_options("${wasmTarget}" INTERFACE -O2 -msimd128 -msse -msse2)
endif()
- if (QT_FEATURE_opengles3)
- target_link_options("${wasmTarget}" INTERFACE "SHELL:-s FULL_ES3=1")
-
- target_link_options("${wasmTarget}" INTERFACE "SHELL:-s FULL_ES3=1"
- "SHELL:-s MAX_WEBGL_VERSION=2"
- "SHELL:-s WEBGL2_BACKWARDS_COMPATIBILITY_EMULATION=1")
- else()
- target_link_options("${wasmTarget}" INTERFACE "SHELL:-s FULL_ES2=1")
- endif()
-
set(disable_exceptions_catching 1)
if (QT_FEATURE_exceptions)
set(disable_exceptions_catching 0)