mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Update examples to build on Emscripten Wasm. Add separate wasm and wasm2js targets. (#2145)
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user