pub struct SceneData<'a> {
pub vertices: &'a [Vertex],
pub indices: &'a [u32],
pub draw_objects: Vec<DrawObject>,
pub instanced_clusters: Vec<InstancedCluster>,
pub n_skinned: usize,
pub n_chunk_max: usize,
}Expand description
Static scene geometry and the draw lists built over it.
Fields§
§vertices: &'a [Vertex]The world’s shared static vertex buffer.
indices: &'a [u32]The world’s shared static index buffer.
draw_objects: Vec<DrawObject>One draw record per static placement.
instanced_clusters: Vec<InstancedCluster>One record per instanced-prop cluster.
n_skinned: usizeSkinned draw-object count (the world’s SkinnedMesh count). Sizes each
backend’s shared GPU-cull buffers for the merged total (static +
instances + skinned) at init; the skinned geometry itself is uploaded
later via upload_skinned.
n_chunk_max: usizeWorst-case resident chunk count for a streaming VoxelWorld (0 otherwise). Reserves a chunk record region in the shared GPU-cull buffers at init; resident chunks fold into the indirect path each frame. Honoured by DirectX + Vulkan; Metal’s per-frame rebuild already covers chunks, so it needs no reserve.
Auto Trait Implementations§
impl<'a> Freeze for SceneData<'a>
impl<'a> RefUnwindSafe for SceneData<'a>
impl<'a> Send for SceneData<'a>
impl<'a> Sync for SceneData<'a>
impl<'a> Unpin for SceneData<'a>
impl<'a> UnsafeUnpin for SceneData<'a>
impl<'a> UnwindSafe for SceneData<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more