simvx.graphics.renderer.buffer_manager¶
BufferManager — owns the forward renderer’s SSBOs and descriptor sets.
Extracted from Renderer so transform/material/light/shadow/joint
buffers and the Forward+ tile-culling placeholders live in one place. The
descriptor set layout and cubemap placeholder are owned here too so the
renderer can swap the IBL cubemap in via write_cubemap_descriptor.
Module Contents¶
Classes¶
Owns the renderer’s SSBOs and descriptor sets. |
Data¶
API¶
- simvx.graphics.renderer.buffer_manager.__all__¶
[‘BufferManager’, ‘SHADOW_DATA_SIZE’]
- simvx.graphics.renderer.buffer_manager.log¶
‘getLogger(…)’
- simvx.graphics.renderer.buffer_manager.SHADOW_DATA_SIZE¶
352
- class simvx.graphics.renderer.buffer_manager.BufferManager(engine: Any, max_objects: int, max_materials: int = 1024, max_lights: int = 256, max_joints: int = 256)[source]¶
Owns the renderer’s SSBOs and descriptor sets.
Main descriptor set (
ssbo_set) exposes seven bindings: 0: transforms, 1: materials, 2: lights, 3: shadow, 4: IBL cubemap sampler, 5: tile light indices, 6: tile info.Joint descriptor set (
joint_set) is set 2 binding 0 for skinned meshes.Initialization
- upload_transforms(instances: list) None[source]¶
Upload all instance transforms + normal matrices + material ids to the SSBO.
- set_materials(materials: numpy.ndarray) numpy.ndarray[source]¶
Upload material array. Returns the (possibly clamped) array stored.
- set_lights(lights: numpy.ndarray) None[source]¶
Upload light array prefixed with the uint32 count (GLSL LightBuffer layout).
- write_shadow_data(shadow_data: numpy.ndarray) None[source]¶
Upload raw shadow SSBO bytes (used by shadow passes + IBL-only fallback).