Skip to content

Commit

Permalink
update emscripten webgl link flags
Browse files Browse the repository at this point in the history
USE_WEBGL2 deprecated.
WebGL1 was removed from sokol 30-Apr-2023
  • Loading branch information
epreston committed Aug 14, 2024
1 parent 9c8cad6 commit 62b6c44
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bindgen/gen_nim.py
Original file line number Diff line number Diff line change
Expand Up @@ -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".}')
Expand Down
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 62b6c44

Please sign in to comment.