pub trait GpuComponentArrayBuffer:
Component
+ Send
+ Sync
+ 'static {
type QueryData: ReadOnlyQueryData;
type QueryFilter: QueryFilter;
type Out: NoUninit + AnyBitPattern;
// Required method
fn extract_component(
item: <Self::QueryData as QueryData>::Item<'_, '_>,
) -> Option<Self::Out>;
// Provided methods
fn label() -> Cow<'static, str> { ... }
fn buffer_usage() -> BufferUsages { ... }
}Expand description
A lightweight mechanism to expose component data that may differ between
mesh instances to the GPU in the form of a ShaderBuffer.
Required Associated Types§
Sourcetype QueryData: ReadOnlyQueryData
type QueryData: ReadOnlyQueryData
The query to perform to update the component data.
Sourcetype QueryFilter: QueryFilter
type QueryFilter: QueryFilter
An optional filter to apply to the query.
Sourcetype Out: NoUninit + AnyBitPattern
type Out: NoUninit + AnyBitPattern
The packed GPU data.
Required Methods§
Provided Methods§
Sourcefn label() -> Cow<'static, str>
fn label() -> Cow<'static, str>
Override this function to supply a custom debugging label for the buffer.
Sourcefn buffer_usage() -> BufferUsages
fn buffer_usage() -> BufferUsages
Override this function to provide a custom set of allowed buffer usages for the buffer.
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.