pub struct ChunkMesh<'a> {
pub verts: &'a [Vertex],
pub idxs: &'a [u16],
pub model: [[f32; 4]; 4],
pub texture_slot: usize,
pub normal_map_slot: usize,
pub material: MaterialUniforms,
pub frame: u64,
}Expand description
One streamed chunk’s geometry plus placement, supplied to
RenderBackend::add_chunk_mesh. frame reclaims retired deferred frees
before the chunk is placed in the streaming headroom.
Fields§
§verts: &'a [Vertex]Chunk vertices.
idxs: &'a [u16]Chunk indices, mesh-relative.
model: [[f32; 4]; 4]Column-major placement matrix.
texture_slot: usizeIndex into the shared texture pool for the albedo map.
normal_map_slot: usizeIndex into the shared texture pool for the normal map.
material: MaterialUniformsPer-chunk material scalars.
frame: u64Current frame number, used to reclaim retired deferred frees.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for ChunkMesh<'a>
impl<'a> RefUnwindSafe for ChunkMesh<'a>
impl<'a> Send for ChunkMesh<'a>
impl<'a> Sync for ChunkMesh<'a>
impl<'a> Unpin for ChunkMesh<'a>
impl<'a> UnsafeUnpin for ChunkMesh<'a>
impl<'a> UnwindSafe for ChunkMesh<'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