simvx.graphics.renderer.forward¶
Forward renderer — implements the Renderer ABC for the engine backend.
Module Contents¶
Classes¶
Forward renderer with multi-draw indirect, per-viewport frustum culling. |
Data¶
API¶
- simvx.graphics.renderer.forward.__all__¶
[‘ForwardRenderer’]
- simvx.graphics.renderer.forward.log¶
‘getLogger(…)’
- class simvx.graphics.renderer.forward.ForwardRenderer(engine: Any, max_objects: int = 10000)¶
Bases:
simvx.graphics.renderer._base.RendererForward renderer with multi-draw indirect, per-viewport frustum culling.
Initialization
- setup() None¶
Initialize GPU resources — called once after engine Vulkan init.
- set_skybox(cubemap_view: Any, cubemap_sampler: Any) None¶
Set a cubemap as the skybox and enable IBL.
- property post_processing: simvx.graphics.renderer.post_process.PostProcessPass | None¶
Access post-processing pass for configuration.
- set_gizmo_data(data: simvx.graphics.renderer.gizmo_pass.GizmoRenderData | None) None¶
Set gizmo render data for the current frame (or None to hide).
- property ssao: simvx.graphics.renderer.ssao_pass.SSAOPass | None¶
Access SSAO pass for configuration.
- set_materials(materials: numpy.ndarray) None¶
Set material array and upload to GPU (skips if unchanged).
- set_lights(lights: numpy.ndarray) None¶
Set light array and upload to GPU (skips if unchanged).
Prepends uint32 light_count to match GLSL LightBuffer layout: [uint32 count][Light[0]][Light[1]]…
- submit_text(text: str, x: float, y: float, font_path: str | None = None, size: float = 24.0, color: tuple = (1.0, 1.0, 1.0, 1.0)) None¶
Submit text for 2D overlay rendering.
- init(device: Any, swapchain: Any) None¶
Initialize (called by ABC contract — use setup() instead).
- begin_frame() Any¶
Begin frame — clear submission lists.
- submit_instance(mesh_handle: simvx.graphics._types.MeshHandle, transform: numpy.ndarray, material_id: int = 0, viewport_id: int = 0) None¶
Submit a mesh instance for rendering this frame.
- submit_particles(particle_data: numpy.ndarray) None¶
Submit particle data for rendering this frame.
- submit_light2d(**kwargs) None¶
Submit a 2D light for this frame (forwarded to Light2DPass).
- submit_occluder2d(polygon_vertices: list[tuple[float, float]]) None¶
Submit a 2D occluder polygon for shadow casting this frame.
- submit_skinned_instance(mesh_handle: simvx.graphics._types.MeshHandle, transform: numpy.ndarray, material_id: int, joint_matrices: numpy.ndarray) None¶
Submit a skinned mesh instance with joint matrices for this frame.
- submit_dynamic(vertices: numpy.ndarray, indices: numpy.ndarray, transform: numpy.ndarray, material_id: int = 0, viewport_id: int = 0) None¶
Submit dynamic geometry (uploaded and drawn this frame only).
- pre_render(cmd: Any) None¶
Record offscreen passes (shadow maps, HDR) before main render pass begins.
- render(cmd: Any) None¶
Record draw commands for all viewports.
- end_frame(cmd: Any) None¶
End frame.
- resize(width: int, height: int) None¶
Handle framebuffer resize — recreate pipeline.
- cleanup() None¶
Release all GPU resources.
- destroy() None¶
ABC destroy — delegates to cleanup.
- __slots__¶
()