2026-08-11 21:06:28 +01:00
|
|
|
# NYXGFX
|
|
|
|
|
Low cortisol crossplatform RHI (Rendering Hardware Interface)
|
|
|
|
|
|
|
|
|
|
## Backends
|
2026-08-11 21:11:00 +01:00
|
|
|
- [x] Vulkan
|
|
|
|
|
- [ ] OpenGL
|
|
|
|
|
- [ ] DX12
|
2026-08-11 21:06:28 +01:00
|
|
|
|
|
|
|
|
## Features
|
|
|
|
|
- Fire and forget
|
|
|
|
|
- Dead simple + Performance + Flexible
|
2026-08-13 00:37:11 +01:00
|
|
|
- Generational Handles
|
2026-08-12 14:52:27 +01:00
|
|
|
- Auto managed
|
2026-08-13 00:37:11 +01:00
|
|
|
- No hidden control flow
|
|
|
|
|
- No hidden memory allocations
|
|
|
|
|
- No preprocessor, no macros
|
2026-08-11 21:26:15 +01:00
|
|
|
|
2026-08-12 02:11:57 +01:00
|
|
|
## Architecture
|
|
|
|
|
```text
|
|
|
|
|
examples/simple/simple.zig
|
|
|
|
|
|
|
|
|
|
src/gfx.zig
|
|
|
|
|
└─ Selected Backend
|
|
|
|
|
|
|
|
|
|
src/rhi/root.zig
|
|
|
|
|
└─ Common / Handles / Configs
|
|
|
|
|
|
|
|
|
|
src/rhi/vulkan/vulkan.zig
|
|
|
|
|
└─ Vulkan Backend / RHI
|
|
|
|
|
|
|
|
|
|
src/rhi/vulkan/resource.zig
|
|
|
|
|
└─ Adapter / Device / Shader
|
|
|
|
|
```
|
2026-08-14 00:23:58 +00:00
|
|
|
|
|
|
|
|
## API
|
2026-08-12 14:52:27 +01:00
|
|
|
| Function | Description |
|
|
|
|
|
| ------------------- | ----------------------------------------------------------------- |
|
|
|
|
|
| `makeX(...)` | Creates an RHI resource and returns its handle |
|
2026-08-14 01:15:10 +01:00
|
|
|
| `deleteX(handle)` | Releases the resource and invalidates the handle |
|
|
|
|
|
| `releaseX(handle)` | Releases the resource but keeps the handle valid |
|
2026-08-12 20:31:05 +01:00
|
|
|
| `getXInfo(handle)` | Returns backend-independent information about the resource |
|
2026-08-13 00:37:11 +01:00
|
|
|
| `getRawX(handle)` | Returns backend-specific raw GPU handle |
|
2026-08-14 01:15:10 +01:00
|
|
|
| `getRawFrame()` | Returns backend-specific raw GPU frame resources |
|
2026-08-12 14:52:27 +01:00
|
|
|
|
2026-08-12 02:11:57 +01:00
|
|
|
## Examples
|
2026-08-11 21:26:15 +01:00
|
|
|
- ```zig build run-simple```
|
2026-08-12 20:56:56 +01:00
|
|
|
- ```zig build run-3D```
|
2026-08-14 01:15:10 +01:00
|
|
|
- ```zig build run-imgui```
|