Skip to content

Commit

Permalink
Emscripten: dynamically switch to WebGL2, if possible
Browse files Browse the repository at this point in the history
  • Loading branch information
paroj committed Jan 21, 2023
1 parent 24d9e0e commit 9e7fb23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Samples/Emscripten/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set(MEDIA_DIR ${CMAKE_BINARY_DIR}/bin/media/)

set(CMAKE_EXECUTABLE_SUFFIX ".html")
set(CMAKE_EXE_LINKER_FLAGS "--preload-file ${MEDIA_DIR}/@. -s EXPORTED_FUNCTIONS=\"[ '_passAssetAsArrayBuffer', '_clearScene', '_main']\" -s USE_SDL=2")
set(CMAKE_EXE_LINKER_FLAGS "--preload-file ${MEDIA_DIR}/@. -s EXPORTED_FUNCTIONS=\"[ '_passAssetAsArrayBuffer', '_clearScene', '_main']\" -s USE_SDL=2 -s MAX_WEBGL_VERSION=2")

add_definitions(-s USE_SDL=2)

Expand Down

0 comments on commit 9e7fb23

Please sign in to comment.