Trait DynamicMeshTypes

Source
pub trait DynamicMeshTypes: MeshTypes {
    type RenderData: Default + Send + Sync + Debug;
    type Instant: Instant;

    const MAXIMUM_MERGED_BLOCK_MESH_SIZE: usize;
}
Expand description

Bundle of types chosen to support dynamically-updating meshes within a specific graphics API.

Implement this trait (using a placeholder type which need not store any data) and MeshTypes if you are using ChunkedSpaceMesh.

Required Associated Constants§

Source

const MAXIMUM_MERGED_BLOCK_MESH_SIZE: usize

Maximum number of indices a block mesh can have before it will no longer be put into combined chunk meshes and will always be instanced instead.

To disable instancing, set this to usize::MAX. To always use instancing, set this to 0.

Required Associated Types§

Source

type RenderData: Default + Send + Sync + Debug

Data accompanying meshes within a ChunkedSpaceMesh and derived from the individual chunk or block instance meshes, for purposes such as handles to GPU buffers.

If no data is needed, such as if ChunkedSpaceMesh is not being used, use [()] here.

Source

type Instant: Instant

Source of time measurement for scheduling and profiling.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§