From 70ae003c08e511ed32927678dca9a3dd8b1e8a7e Mon Sep 17 00:00:00 2001 From: Omar Date: Fri, 11 Oct 2019 16:48:45 +0200 Subject: [PATCH] web resize canvas after init --- webgl/CMakeLists.txt | 4 +++- webgl/src/main.cpp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/webgl/CMakeLists.txt b/webgl/CMakeLists.txt index 6d0147d..af24608 100644 --- a/webgl/CMakeLists.txt +++ b/webgl/CMakeLists.txt @@ -104,7 +104,9 @@ set_target_properties(panopainter PROPERTIES -s FULL_ES3=1\ -s USE_PTHREADS=1\ -s ASSERTIONS=2\ - -s TOTAL_MEMORY=256Mb\ + -s TOTAL_MEMORY=512Mb\ + -s ALLOW_MEMORY_GROWTH=1\ + -s WASM_MEM_MAX=2048MB\ --embed-file data\ --js-library ../src/mylib.js\ --bind" diff --git a/webgl/src/main.cpp b/webgl/src/main.cpp index c8a1bd9..448047c 100644 --- a/webgl/src/main.cpp +++ b/webgl/src/main.cpp @@ -263,6 +263,7 @@ int main() console.log("syncFS result:"); console.log(err); Module.StartApp(); + Module.setCanvasSize(window.innerWidth, window.innerHeight); }); );