https://github.com/michal-z/zig-d3d12-starter
Simple game written from scratch in Zig
https://github.com/michal-z/zig-d3d12-starter
0-dependencies directx12 from-scratch game gamedev graphics-programming ziglang
Last synced: 3 months ago
JSON representation
Simple game written from scratch in Zig
- Host: GitHub
- URL: https://github.com/michal-z/zig-d3d12-starter
- Owner: michal-z
- Created: 2023-12-06T12:20:43.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-11T20:46:38.000Z (over 1 year ago)
- Last Synced: 2024-12-18T05:52:42.668Z (11 months ago)
- Topics: 0-dependencies, directx12, from-scratch, game, gamedev, graphics-programming, ziglang
- Language: Zig
- Homepage:
- Size: 42.1 MB
- Stars: 53
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# zig-d3d12-starter
```
git clone https://github.com/michal-z/zig-d3d12-starter.git
cd zig-d3d12-starter
zig build run
```
Requires [Zig 0.14.1](https://ziglang.org/download/#release-0.14.1) to build.
* Simple game written from scratch
* Modern D3D12 for rendering (fully bindless, ehnanced barriers)
* Direct2D for 2D shape tessellation
* Audio support using XAudio2
* No dependency except [Zig compiler](https://ziglang.org/download/#release-0.14.1)
* DXC compiler included - Zig's caching mechanism integrated to support shader compilation
* Shaders embeded in the output binary
* D3D12 Agility SDK included and integrated
* D3D12 bindings with some helper functions
* D3D12 debug layer and GPU-based validation support
* No libc dependency
Build options:
-Doptimize=ReleaseFast (generate small and fast binary)
-Dd3d12-debug=true (enable D3D12 debug layer)
-Dd3d12-debug-gpu=true (enable D3D12 debug layer and GPU-based validation)
Example:
zig build run -Doptimize=ReleaseFast -Dd3d12-debug=true
