Expand description
Generation-checked resource handles and reference-counted registry.
Resources (textures, shaders) are identified by TextureHandle and
ShaderHandle — lightweight generation-checked tokens. The
ResourceRegistry tracks reference counts and recycles slots so the
same index can be safely reused without stale-handle confusion.
RAII wrappers (TextureGuard, ShaderGuard) automatically decrement
the reference count when dropped.
Structs§
- Resource
Id - A generation-checked resource identifier.
- Resource
Registry - Shared registry of GPU textures and shaders, with generation-checked handles and reference counting.
- Shader
Guard - RAII wrapper that releases a
ShaderHandlewhen dropped. - Shader
Handle - An opaque handle to a GPU shader resource.
- Texture
Guard - RAII wrapper that releases a
TextureHandlewhen dropped. - Texture
Handle - An opaque handle to a GPU texture resource.