API for the SiputBiru Graphics Library (SBgl).
uint64_t sbgl_Voxel_GetInstanceAddress(sbgl_VoxelSystem *sys)
Returns the device address of the instance buffer.
void sbgl_Voxel_Cull(sbgl_VoxelSystem *sys, sbgl_Mat4 view_proj)
Performs GPU-driven frustum culling on voxel chunks. MUST be called BEFORE sbgl_BeginDrawing.
uint64_t sbgl_Voxel_GetPaletteAddress(sbgl_VoxelSystem *sys)
Returns the device address of the material palette buffer.
uint64_t sbgl_Voxel_GetAABBAddress(sbgl_VoxelSystem *sys)
Returns the device address of the AABB buffer.
void sbgl_Voxel_Update(sbgl_VoxelSystem *sys, sbgl_Vec3 camera_pos)
Updates the voxel system state based on the current camera position. This function handles chunk gene...
void sbgl_Voxel_Render(sbgl_VoxelSystem *sys)
Issues the indirect draw calls for visible voxel chunks. MUST be called BETWEEN sbgl_BeginDrawing and...
void sbgl_Voxel_Destroy(sbgl_VoxelSystem *sys)
Destroys the voxel system and releases all associated resources.
sbgl_VoxelSystem * sbgl_Voxel_Create(sbgl_Context *ctx, const sbgl_VoxelConfig *config)
Creates and initializes a new voxel system. This operation allocates GPU resources and internal track...
4x4 Matrix, 16-byte aligned, column-major.
Configuration parameters for initializing the voxel system.
bool enable_telemetry
Enables console output for performance metrics and visible chunk counts.
uint32_t max_slots
Maximum number of chunk slots to manage in the GPU-side pool. This value determines the total memory ...
uint32_t chunk_radius
Radius (in chunks) around the camera that should be maintained. Chunks outside this radius are candid...
Internal state for the voxel system. This structure adheres to Data-Oriented Design principles by mai...
3D Vector, 16-byte aligned and padded for SIMD safety.
4D Vector, 16-byte aligned.