Update examples to build on Emscripten Wasm. Add separate wasm and wasm2js targets. (#2145)

This commit is contained in:
juj
2020-05-17 05:45:55 +03:00
committed by GitHub
parent 0197e2c1ca
commit 098e6194d9
8 changed files with 48 additions and 25 deletions

View File

@@ -362,12 +362,12 @@ function exampleProjectDefaults()
"GLESv2",
}
configuration { "asmjs" }
configuration { "wasm*" }
kind "ConsoleApp"
linkoptions {
"-s TOTAL_MEMORY=256MB",
"--memory-init-file 1",
"-s TOTAL_MEMORY=32MB",
"-s ALLOW_MEMORY_GROWTH=1"
}
removeflags {
@@ -537,7 +537,6 @@ or _OPTIONS["with-combined-examples"] then
, "14-shadowvolumes"
, "15-shadowmaps-simple"
, "16-shadowmaps"
, "17-drawstress"
, "18-ibl"
, "19-oit"
, "20-nanovg"
@@ -563,6 +562,11 @@ or _OPTIONS["with-combined-examples"] then
, "41-tess"
)
-- 17-drawstress requires multithreading, does not compile for singlethreaded wasm
-- if platform is not single-threaded then
exampleProject(false, "17-drawstress")
-- end
-- C99 source doesn't compile under WinRT settings
if not premake.vstudio.iswinrt() then
exampleProject(false, "25-c99")