diff options
| author | Ed Preston <epreston@prestonsoft.com> | 2024-08-14 22:13:21 +1000 |
|---|---|---|
| committer | Ed Preston <epreston@prestonsoft.com> | 2024-08-14 22:13:21 +1000 |
| commit | 62b6c44edbfd64a454bdcff185fbfb9fd3c16267 (patch) | |
| tree | 82a3537ca248eb4cf1f3a3bb8fe6834063879438 | |
| parent | 9c8cad6ae91f0cd6463455c9e5618c91b9721c08 (diff) | |
update emscripten webgl link flags
USE_WEBGL2 deprecated.
WebGL1 was removed from sokol 30-Apr-2023
| -rw-r--r-- | bindgen/gen_nim.py | 2 | ||||
| -rw-r--r-- | tests/CMakeLists.txt | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/bindgen/gen_nim.py b/bindgen/gen_nim.py index dab4f979..722329b7 100644 --- a/bindgen/gen_nim.py +++ b/bindgen/gen_nim.py @@ -521,7 +521,7 @@ def gen_extra(inp): l('when defined emscripten:') l(' {.passl:"-lGL -ldl".}') l(' {.passc:"-DSOKOL_GLES3".}') - l(' {.passL: "-s USE_WEBGL2=1".}') + l(' {.passL: "-s MIN_WEBGL_VERSION=2 -s MAX_WEBGL_VERSION=2".}') l('elif defined windows:') l(' when not defined vcc:') l(' {.passl:"-lkernel32 -luser32 -lshell32 -lgdi32".}') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9c7d3cba..89e01a7f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -73,7 +73,7 @@ if (EMSCRIPTEN) if (SOKOL_BACKEND STREQUAL SOKOL_WGPU) set(link_flags ${link_flags} -sUSE_WEBGPU=1) else() - set(link_flags ${link_flags} -sUSE_WEBGL2=1) + set(link_flags ${link_flags} -sMIN_WEBGL_VERSION=2 -sMAX_WEBGL_VERSION=2) endif() elseif (OSX_IOS) set(exe_type MACOSX_BUNDLE) |