aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaytan Laats <laytanlaats@hotmail.com>2024-09-29 10:38:29 +0200
committerLaytan Laats <laytanlaats@hotmail.com>2024-09-29 10:39:28 +0200
commiteeaa9f048b0ed6e16cb2cabb76dbc4a1f6b91e39 (patch)
tree9b1565625d5166d7521c6d8e4ccd5816de89185c
parent90d024fb70f7b2c4c5532d1f3478c6bf0b95d678 (diff)
fix wgpu examples after move of files in 95721fe
-rw-r--r--vendor/wgpu/examples/glfw/Makefile4
-rw-r--r--vendor/wgpu/examples/glfw/build.bat2
-rw-r--r--vendor/wgpu/examples/glfw/os_js.odin3
-rw-r--r--vendor/wgpu/examples/glfw/web/index.html2
-rw-r--r--vendor/wgpu/examples/sdl2/Makefile4
-rw-r--r--vendor/wgpu/examples/sdl2/build.bat2
-rw-r--r--vendor/wgpu/examples/sdl2/os_js.odin3
-rw-r--r--vendor/wgpu/examples/sdl2/web/index.html2
8 files changed, 12 insertions, 10 deletions
diff --git a/vendor/wgpu/examples/glfw/Makefile b/vendor/wgpu/examples/glfw/Makefile
index fdecdbb91..022bfcbbc 100644
--- a/vendor/wgpu/examples/glfw/Makefile
+++ b/vendor/wgpu/examples/glfw/Makefile
@@ -8,10 +8,10 @@ PAGE_SIZE := 65536
INITIAL_MEMORY_BYTES := $(shell expr $(INITIAL_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 . \
-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)"
cp ../../wgpu.js web/wgpu.js
- cp ../../../wasm/js/runtime.js web/runtime.js
+ cp ../../../../core/sys/wasm/js/odin.js web/odin.js
diff --git a/vendor/wgpu/examples/glfw/build.bat b/vendor/wgpu/examples/glfw/build.bat
index 61afcbe66..b71d4344a 100644
--- a/vendor/wgpu/examples/glfw/build.bat
+++ b/vendor/wgpu/examples/glfw/build.bat
@@ -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%"
copy "..\..\wgpu.js" "web\wgpu.js"
-copy "..\..\..\wasm\js\runtime.js" "web\runtime.js" \ No newline at end of file
+copy "..\..\..\..\core\sys\wasm\js\odin.js" "web\odin.js"
diff --git a/vendor/wgpu/examples/glfw/os_js.odin b/vendor/wgpu/examples/glfw/os_js.odin
index 9634f4afe..68f9ef672 100644
--- a/vendor/wgpu/examples/glfw/os_js.odin
+++ b/vendor/wgpu/examples/glfw/os_js.odin
@@ -1,7 +1,8 @@
package vendor_wgpu_example_triangle
+import "core:sys/wasm/js"
+
import "vendor:wgpu"
-import "vendor:wasm/js"
OS :: struct {
initialized: bool,
diff --git a/vendor/wgpu/examples/glfw/web/index.html b/vendor/wgpu/examples/glfw/web/index.html
index 61872e35a..a509cafbd 100644
--- a/vendor/wgpu/examples/glfw/web/index.html
+++ b/vendor/wgpu/examples/glfw/web/index.html
@@ -8,7 +8,7 @@
<body id="body" style="height: 100%; padding: 0; margin: 0; overflow: hidden;">
<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">
const mem = new WebAssembly.Memory({ initial: 2000, maximum: 65536, shared: false });
diff --git a/vendor/wgpu/examples/sdl2/Makefile b/vendor/wgpu/examples/sdl2/Makefile
index fdecdbb91..022bfcbbc 100644
--- a/vendor/wgpu/examples/sdl2/Makefile
+++ b/vendor/wgpu/examples/sdl2/Makefile
@@ -8,10 +8,10 @@ PAGE_SIZE := 65536
INITIAL_MEMORY_BYTES := $(shell expr $(INITIAL_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 . \
-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)"
cp ../../wgpu.js web/wgpu.js
- cp ../../../wasm/js/runtime.js web/runtime.js
+ cp ../../../../core/sys/wasm/js/odin.js web/odin.js
diff --git a/vendor/wgpu/examples/sdl2/build.bat b/vendor/wgpu/examples/sdl2/build.bat
index 61afcbe66..b71d4344a 100644
--- a/vendor/wgpu/examples/sdl2/build.bat
+++ b/vendor/wgpu/examples/sdl2/build.bat
@@ -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%"
copy "..\..\wgpu.js" "web\wgpu.js"
-copy "..\..\..\wasm\js\runtime.js" "web\runtime.js" \ No newline at end of file
+copy "..\..\..\..\core\sys\wasm\js\odin.js" "web\odin.js"
diff --git a/vendor/wgpu/examples/sdl2/os_js.odin b/vendor/wgpu/examples/sdl2/os_js.odin
index 9634f4afe..68f9ef672 100644
--- a/vendor/wgpu/examples/sdl2/os_js.odin
+++ b/vendor/wgpu/examples/sdl2/os_js.odin
@@ -1,7 +1,8 @@
package vendor_wgpu_example_triangle
+import "core:sys/wasm/js"
+
import "vendor:wgpu"
-import "vendor:wasm/js"
OS :: struct {
initialized: bool,
diff --git a/vendor/wgpu/examples/sdl2/web/index.html b/vendor/wgpu/examples/sdl2/web/index.html
index 61872e35a..a509cafbd 100644
--- a/vendor/wgpu/examples/sdl2/web/index.html
+++ b/vendor/wgpu/examples/sdl2/web/index.html
@@ -8,7 +8,7 @@
<body id="body" style="height: 100%; padding: 0; margin: 0; overflow: hidden;">
<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">
const mem = new WebAssembly.Memory({ initial: 2000, maximum: 65536, shared: false });