simvx.graphics.scene_adapter¶
Adapter to bridge SceneTree nodes to ForwardRenderer submissions.
Module Contents¶
Classes¶
Bridges SceneTree (SDL3 API) to ForwardRenderer (Vulkan). |
Data¶
API¶
- simvx.graphics.scene_adapter.__all__¶
[‘SceneAdapter’]
- simvx.graphics.scene_adapter.log¶
‘getLogger(…)’
- class simvx.graphics.scene_adapter.SceneAdapter(engine: Any, renderer: Any)¶
Bridges SceneTree (SDL3 API) to ForwardRenderer (Vulkan).
Responsibilities:
Register meshes with the GPU
Convert materials to Vulkan format
Traverse scene tree and submit instances
Initialization
- register_mesh(mesh: Any) Any | None¶
Register mesh with Vulkan engine, return MeshHandle.
Returns None if the mesh has no vertex data (skipped gracefully).
- register_skinned_mesh(mesh: Any) Any | None¶
Register skinned mesh with Vulkan engine, return MeshHandle.
Returns None if the mesh has no vertex data.
- register_material(material: simvx.core.Material | None) int¶
Convert simvx.core Material to Vulkan material index.
- upload_materials() None¶
Upload material array to renderer.
- submit_scene(tree: simvx.core.SceneTree) None¶
Walk scene tree and submit instances to renderer.
Gracefully handles scenes with no Camera3D (e.g. editor UI-only scenes) by skipping 3D submission while still processing 2D overlays.