mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-03 05:08:14 +00:00
fix wgpu examples after move of files in 95721fe
This commit is contained in:
Vendored
+2
-2
@@ -8,10 +8,10 @@ PAGE_SIZE := 65536
|
|||||||
INITIAL_MEMORY_BYTES := $(shell expr $(INITIAL_MEMORY_PAGES) \* $(PAGE_SIZE))
|
INITIAL_MEMORY_BYTES := $(shell expr $(INITIAL_MEMORY_PAGES) \* $(PAGE_SIZE))
|
||||||
MAX_MEMORY_BYTES := $(shell expr $(MAX_MEMORY_PAGES) \* $(PAGE_SIZE))
|
MAX_MEMORY_BYTES := $(shell expr $(MAX_MEMORY_PAGES) \* $(PAGE_SIZE))
|
||||||
|
|
||||||
web/triangle.wasm: $(FILES) ../../wgpu.js ../../../wasm/js/runtime.js
|
web/triangle.wasm: $(FILES) ../../wgpu.js ../../../../core/sys/wasm/js/odin.js
|
||||||
odin build . \
|
odin build . \
|
||||||
-target:js_wasm32 -out:web/triangle.wasm -o:size \
|
-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)"
|
-extra-linker-flags:"--export-table --import-memory --initial-memory=$(INITIAL_MEMORY_BYTES) --max-memory=$(MAX_MEMORY_BYTES)"
|
||||||
|
|
||||||
cp ../../wgpu.js web/wgpu.js
|
cp ../../wgpu.js web/wgpu.js
|
||||||
cp ../../../wasm/js/runtime.js web/runtime.js
|
cp ../../../../core/sys/wasm/js/odin.js web/odin.js
|
||||||
|
|||||||
Vendored
+1
-1
@@ -9,4 +9,4 @@ 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%"
|
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 "..\..\wgpu.js" "web\wgpu.js"
|
||||||
copy "..\..\..\wasm\js\runtime.js" "web\runtime.js"
|
copy "..\..\..\..\core\sys\wasm\js\odin.js" "web\odin.js"
|
||||||
|
|||||||
Vendored
+2
-1
@@ -1,7 +1,8 @@
|
|||||||
package vendor_wgpu_example_triangle
|
package vendor_wgpu_example_triangle
|
||||||
|
|
||||||
|
import "core:sys/wasm/js"
|
||||||
|
|
||||||
import "vendor:wgpu"
|
import "vendor:wgpu"
|
||||||
import "vendor:wasm/js"
|
|
||||||
|
|
||||||
OS :: struct {
|
OS :: struct {
|
||||||
initialized: bool,
|
initialized: bool,
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
<body id="body" style="height: 100%; padding: 0; margin: 0; overflow: hidden;">
|
<body id="body" style="height: 100%; padding: 0; margin: 0; overflow: hidden;">
|
||||||
<canvas id="wgpu-canvas"></canvas>
|
<canvas id="wgpu-canvas"></canvas>
|
||||||
|
|
||||||
<script type="text/javascript" src="runtime.js"></script>
|
<script type="text/javascript" src="odin.js"></script>
|
||||||
<script type="text/javascript" src="wgpu.js"></script>
|
<script type="text/javascript" src="wgpu.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
const mem = new WebAssembly.Memory({ initial: 2000, maximum: 65536, shared: false });
|
const mem = new WebAssembly.Memory({ initial: 2000, maximum: 65536, shared: false });
|
||||||
|
|||||||
Vendored
+2
-2
@@ -8,10 +8,10 @@ PAGE_SIZE := 65536
|
|||||||
INITIAL_MEMORY_BYTES := $(shell expr $(INITIAL_MEMORY_PAGES) \* $(PAGE_SIZE))
|
INITIAL_MEMORY_BYTES := $(shell expr $(INITIAL_MEMORY_PAGES) \* $(PAGE_SIZE))
|
||||||
MAX_MEMORY_BYTES := $(shell expr $(MAX_MEMORY_PAGES) \* $(PAGE_SIZE))
|
MAX_MEMORY_BYTES := $(shell expr $(MAX_MEMORY_PAGES) \* $(PAGE_SIZE))
|
||||||
|
|
||||||
web/triangle.wasm: $(FILES) ../../wgpu.js ../../../wasm/js/runtime.js
|
web/triangle.wasm: $(FILES) ../../wgpu.js ../../../../core/sys/wasm/js/odin.js
|
||||||
odin build . \
|
odin build . \
|
||||||
-target:js_wasm32 -out:web/triangle.wasm -o:size \
|
-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)"
|
-extra-linker-flags:"--export-table --import-memory --initial-memory=$(INITIAL_MEMORY_BYTES) --max-memory=$(MAX_MEMORY_BYTES)"
|
||||||
|
|
||||||
cp ../../wgpu.js web/wgpu.js
|
cp ../../wgpu.js web/wgpu.js
|
||||||
cp ../../../wasm/js/runtime.js web/runtime.js
|
cp ../../../../core/sys/wasm/js/odin.js web/odin.js
|
||||||
|
|||||||
Vendored
+1
-1
@@ -9,4 +9,4 @@ 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%"
|
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 "..\..\wgpu.js" "web\wgpu.js"
|
||||||
copy "..\..\..\wasm\js\runtime.js" "web\runtime.js"
|
copy "..\..\..\..\core\sys\wasm\js\odin.js" "web\odin.js"
|
||||||
|
|||||||
Vendored
+2
-1
@@ -1,7 +1,8 @@
|
|||||||
package vendor_wgpu_example_triangle
|
package vendor_wgpu_example_triangle
|
||||||
|
|
||||||
|
import "core:sys/wasm/js"
|
||||||
|
|
||||||
import "vendor:wgpu"
|
import "vendor:wgpu"
|
||||||
import "vendor:wasm/js"
|
|
||||||
|
|
||||||
OS :: struct {
|
OS :: struct {
|
||||||
initialized: bool,
|
initialized: bool,
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@
|
|||||||
<body id="body" style="height: 100%; padding: 0; margin: 0; overflow: hidden;">
|
<body id="body" style="height: 100%; padding: 0; margin: 0; overflow: hidden;">
|
||||||
<canvas id="wgpu-canvas"></canvas>
|
<canvas id="wgpu-canvas"></canvas>
|
||||||
|
|
||||||
<script type="text/javascript" src="runtime.js"></script>
|
<script type="text/javascript" src="odin.js"></script>
|
||||||
<script type="text/javascript" src="wgpu.js"></script>
|
<script type="text/javascript" src="wgpu.js"></script>
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
const mem = new WebAssembly.Memory({ initial: 2000, maximum: 65536, shared: false });
|
const mem = new WebAssembly.Memory({ initial: 2000, maximum: 65536, shared: false });
|
||||||
|
|||||||
Reference in New Issue
Block a user