transparent-cube

Minimal cross-platform native/wasm graphics example.
git clone git://git.amin.space/transparent-cube.git
Log | Files | Refs | README | LICENSE

commit 1e096735a861f2436dfceed880ad8efc89729d4e
parent 6c2ae4e6d06972fe5d1855e92116ccc09d1caae4
Author: amin <dev@aminmesbah.com>
Date:   Fri, 21 Jun 2019 01:32:05 +0000

Clean up a bit

FossilOrigin-Name: c259af37ec921bac5f1f6edf80150cf50aeab006f40cabfa7b290bb9ab6602dc
Diffstat:
Mbuild_wasm.sh | 9---------
Mjs/loader.js | 4++--
Msrc/game.c | 1-
3 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/build_wasm.sh b/build_wasm.sh @@ -18,12 +18,3 @@ wasm-ld --no-entry wasm.o \ -allow-undefined-file wasm_js_implemented_symbols.txt \ --export-all \ --import-memory - -#clang \ -# --target=wasm32 \ -# -emit-llvm \ -# -fno-builtin \ -# -c \ -# -S \ -# -DGAME_WEBGL \ -# src/game.c diff --git a/js/loader.js b/js/loader.js @@ -44,9 +44,9 @@ window.onload = async function() { } let binary = files[0]; - imports['memory'] = new WebAssembly['Memory']({'initial':32}); + imports['memory'] = new WebAssembly.Memory({'initial':32}); memory = new Uint8Array(imports['memory']['buffer']); - let program = await WebAssembly['instantiate'](binary, {"env":imports}); + let program = await WebAssembly.instantiate(binary, {"env":imports}); let instance = program['instance']; exports = instance['exports']; diff --git a/src/game.c b/src/game.c @@ -106,7 +106,6 @@ void game_update_and_render(struct GameState *game_state, float dt, u32 screen_w shader_use(&game_state->cube_shader); shader_setm4(&game_state->cube_shader, "view", &view); - print("boooooooork"); shader_setm4(&game_state->cube_shader, "projection", &projection); m4 model = glmth_m4_init_id();