aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2024-08-14 14:47:53 +0200
committerGitHub <noreply@github.com>2024-08-14 14:47:53 +0200
commit5c68177708b3d8406595a76d6ee5d5571cde235a (patch)
tree82a3537ca248eb4cf1f3a3bb8fe6834063879438
parent9c8cad6ae91f0cd6463455c9e5618c91b9721c08 (diff)
parent62b6c44edbfd64a454bdcff185fbfb9fd3c16267 (diff)
Merge pull request #1093 from epreston/update-emscripten-flag
chore: update emscripten webgl link flags
-rw-r--r--bindgen/gen_nim.py2
-rw-r--r--tests/CMakeLists.txt2
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)