1.4 KiB
1.4 KiB
NYXGFX
Low cortisol crossplatform RHI (Rendering Hardware Interface)
Backends
- Vulkan
- OpenGL
- DX12
Features
- Fire and forget
- Dead simple + Performance + Flexible
- Generational Handles
- Auto managed
- No hidden control flow
- No hidden memory allocations
- No preprocessor, no macros
Architecture
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
API
| Function | Description |
|---|---|
makeX(...) |
Creates an RHI resource and returns its handle |
deleteX(handle) |
Releases the resource and invalidates the handle |
releaseX(handle) |
Releases the resource but keeps the handle valid |
getXInfo(handle) |
Returns backend-independent information about the resource |
getRawX(handle) |
Returns backend-specific raw GPU handle |
getRawFrame() |
Returns backend-specific raw GPU frame resources |
Examples
zig build run-simplezig build run-imguizig build run-3D