NYXGFX/README.md

49 lines
1.4 KiB
Markdown
Raw Normal View History

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
- Generational Handles
2026-08-12 14:52:27 +01:00
- Auto managed
- 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 |
| `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 |
| `getRawX(handle)` | Returns backend-specific raw GPU handle |
| `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```
- ```zig build run-imgui```