Add sdl2glue to vendor:wgpu package + triangle example
This commit is contained in:
1 parent
65fec9134e
commit
f3f08a4b47
10 files changed
+290
-5
No files matched your search
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
REM NOTE: changing this requires changing the same values in the `web/index.html`.
|
||||
set INITIAL_MEMORY_PAGES=2000
|
||||
set MAX_MEMORY_PAGES=65536
|
||||
|
||||
set PAGE_SIZE=65536
|
||||
set /a INITIAL_MEMORY_BYTES=%INITIAL_MEMORY_PAGES% * %PAGE_SIZE%
|
||||
set /a MAX_MEMORY_BYTES=%MAX_MEMORY_PAGES% * %PAGE_SIZE%
|
||||
|
||||
call odin.exe build . -target:js_wasm32 -out:web/triangle.wasm -o:size -extra-linker-flags:"--export-table --import-memory --initial-memory=%INITIAL_MEMORY_BYTES% --max-memory=%MAX_MEMORY_BYTES%"
|
||||
|
||||
copy "..\..\wgpu.js" "web\wgpu.js"
|
||||
copy "..\..\..\wasm\js\runtime.js" "web\runtime.js"
|
||||
Reference in new issue
Block a user