simvx.graphics.renderer.tilemap_pass¶
GPU-batched TileMap renderer — single draw call per layer via instanced SSBO quads.
Module Contents¶
Classes¶
Renders tilemap layers as instanced quads via SSBO. |
Data¶
API¶
- simvx.graphics.renderer.tilemap_pass.__all__¶
[‘TileMapPass’]
- simvx.graphics.renderer.tilemap_pass.log¶
‘getLogger(…)’
- simvx.graphics.renderer.tilemap_pass.TILE_INSTANCE_DTYPE¶
‘dtype(…)’
- simvx.graphics.renderer.tilemap_pass.MAX_TILES¶
65536
- class simvx.graphics.renderer.tilemap_pass.TileMapPass(engine: Any)¶
Renders tilemap layers as instanced quads via SSBO.
Each layer is submitted as a contiguous block of tile instances. All layers share a single SSBO upload; each layer draws with an offset.
Initialization
- setup() None¶
Create GPU resources: SSBO, pipeline, descriptors.
- begin_frame() None¶
Clear per-frame submissions.
- submit_layer(tile_data: numpy.ndarray, tileset_texture_id: int, tile_size: tuple[float, float]) None¶
Queue a tile layer for rendering.
Args: tile_data: Structured array with TILE_INSTANCE_DTYPE. tileset_texture_id: Bindless texture index for the tileset atlas. tile_size: (width, height) of each tile in world units.
- render(cmd: Any, view_matrix: numpy.ndarray, extent: tuple[int, int]) None¶
Record draw commands for all queued tile layers.
- cleanup() None¶
Destroy all GPU resources.