https://github.com/ousttrue/zig-opengl-wasm
sample
https://github.com/ousttrue/zig-opengl-wasm
Last synced: about 1 year ago
JSON representation
sample
- Host: GitHub
- URL: https://github.com/ousttrue/zig-opengl-wasm
- Owner: ousttrue
- Created: 2022-09-10T04:20:39.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-04-01T18:15:46.000Z (about 3 years ago)
- Last Synced: 2025-03-24T05:01:39.709Z (about 1 year ago)
- Language: JavaScript
- Homepage: https://ousttrue.github.io/zig-opengl-wasm/
- Size: 66.4 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# zig-opengl-wasm
sample
- [zig で OpenGL、そして wasm](https://qiita.com/ousttrue/items/4802b61ba340dd7d89f3)
## 202304更新
- `zig-0.11.0-dev.2336`
- glfw を cmake でビルドせずに build.zig でコンパイルする
- [x] Windows11
- [x] Ubuntu22.04
- [ ] WSL(動くがOpenGLの絵が出ない)
- [x] wasm https://ousttrue.github.io/zig-opengl-wasm/
## desktop build
```
$ cd engine
engine$ zig build
engine$ cd ../desktop
dekstop$ zig build
```
### run
```
dekstop$ zig-out/bin/desktop
```
windows は `engine.dll` にパスを通す必要があります。
```
desktop$ cp ../engine/zig-out/lib/engine.dll zig-out/bin/
desktop$ zig-out/bin/desktop
```
## wasm build
```
$ cd engine
engine$ zig build -Dtarget=wasm32-freestanding
```