From 266501b90392c2f0f02292a6e7231b0974f371dc Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Sun, 17 Dec 2017 23:48:33 -0500 Subject: [PATCH] Attempt at enabling WebGL2 in wasm (not yet working). --- debug_asmjs.sh | 4 ++++ release_asmjs.sh | 2 +- release_wasm.sh | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100755 debug_asmjs.sh diff --git a/debug_asmjs.sh b/debug_asmjs.sh new file mode 100755 index 0000000..4536095 --- /dev/null +++ b/debug_asmjs.sh @@ -0,0 +1,4 @@ +set -e +cargo rustc --target asmjs-unknown-emscripten --bin mandelwow -- -C link-args='--emrun -s USE_WEBGL2=1 -s USE_SDL=2 -s ASSERTIONS=2 --preload-file flora.xm' +cp -a target/asmjs-unknown-emscripten/debug/mandelwow.js . +emrun . diff --git a/release_asmjs.sh b/release_asmjs.sh index 8464101..ca5c98c 100755 --- a/release_asmjs.sh +++ b/release_asmjs.sh @@ -1,4 +1,4 @@ set -e -cargo rustc --target asmjs-unknown-emscripten --release --no-default-features --bin mandelwow -- -C link-args='-s USE_SDL=2' +cargo rustc --target asmjs-unknown-emscripten --release --no-default-features --bin mandelwow -- -C link-args='--emrun -s USE_WEBGL2=1 -s USE_SDL=2 -s ASSERTIONS=2 --preload-file flora.xm' cp -a target/asmjs-unknown-emscripten/release/mandelwow.js . emrun . diff --git a/release_wasm.sh b/release_wasm.sh index 5738e2a..9e4992f 100755 --- a/release_wasm.sh +++ b/release_wasm.sh @@ -1,8 +1,7 @@ set -e export CFLAGS="-O2" export CXXFLAGS="$CFLAGS" -#cargo rustc --target wasm32-unknown-emscripten --release --bin mandelwow -- -C link-args='-s USE_WEBGL2=1 -s USE_SDL=2 --preload-file flora.xm' -cargo rustc --target wasm32-unknown-emscripten --release --bin mandelwow -- -C link-args='-s USE_SDL=2 --preload-file flora.xm' +cargo rustc --target wasm32-unknown-emscripten --release --bin mandelwow -- -C link-args='--emrun -s USE_WEBGL2=1 -s USE_SDL=2 -s ASSERTIONS=2 --preload-file flora.xm' cp -a target/wasm32-unknown-emscripten/release/mandelwow.{js,wasm} . cp -a target/wasm32-unknown-emscripten/release/deps/mandelwow.data . emrun . -- 2.25.1