Struct bevy_internal::sprite::Mesh2dPipeline
source · pub struct Mesh2dPipeline {
pub view_layout: BindGroupLayout,
pub mesh_layout: BindGroupLayout,
pub dummy_white_gpu_image: GpuImage,
pub per_object_buffer_batch_size: Option<u32>,
}
Fields§
§view_layout: BindGroupLayout
§mesh_layout: BindGroupLayout
§dummy_white_gpu_image: GpuImage
§per_object_buffer_batch_size: Option<u32>
Implementations§
source§impl Mesh2dPipeline
impl Mesh2dPipeline
pub fn get_image_texture<'a>( &'a self, gpu_images: &'a RenderAssets<Image>, handle_option: &Option<Handle<Image>> ) -> Option<(&'a TextureView, &'a Sampler)>
Trait Implementations§
source§impl Clone for Mesh2dPipeline
impl Clone for Mesh2dPipeline
source§fn clone(&self) -> Mesh2dPipeline
fn clone(&self) -> Mesh2dPipeline
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl FromWorld for Mesh2dPipeline
impl FromWorld for Mesh2dPipeline
source§fn from_world(world: &mut World) -> Mesh2dPipeline
fn from_world(world: &mut World) -> Mesh2dPipeline
Creates
Self
using data from the given World
.source§impl GetBatchData for Mesh2dPipeline
impl GetBatchData for Mesh2dPipeline
type Param = Res<'static, RenderMesh2dInstances>
§type CompareData = (Material2dBindGroupId, AssetId<Mesh>)
type CompareData = (Material2dBindGroupId, AssetId<Mesh>)
Data used for comparison between phase items. If the pipeline id, draw
function id, per-instance data buffer dynamic offset and this data
matches, the draws can be batched.
§type BufferData = Mesh2dUniform
type BufferData = Mesh2dUniform
The per-instance data to be inserted into the
GpuArrayBuffer
containing these data for all instances.source§fn get_batch_data(
mesh_instances: &<<Mesh2dPipeline as GetBatchData>::Param as SystemParam>::Item<'_, '_>,
entity: Entity
) -> Option<(<Mesh2dPipeline as GetBatchData>::BufferData, Option<<Mesh2dPipeline as GetBatchData>::CompareData>)>
fn get_batch_data( mesh_instances: &<<Mesh2dPipeline as GetBatchData>::Param as SystemParam>::Item<'_, '_>, entity: Entity ) -> Option<(<Mesh2dPipeline as GetBatchData>::BufferData, Option<<Mesh2dPipeline as GetBatchData>::CompareData>)>
Get the per-instance data to be inserted into the
GpuArrayBuffer
.
If the instance can be batched, also return the data used for
comparison when deciding whether draws can be batched, else return None
for the CompareData
.source§impl SpecializedMeshPipeline for Mesh2dPipeline
impl SpecializedMeshPipeline for Mesh2dPipeline
type Key = Mesh2dPipelineKey
fn specialize( &self, key: <Mesh2dPipeline as SpecializedMeshPipeline>::Key, layout: &Hashed<InnerMeshVertexBufferLayout> ) -> Result<RenderPipelineDescriptor, SpecializedMeshPipelineError>
impl Resource for Mesh2dPipeline
Auto Trait Implementations§
impl RefUnwindSafe for Mesh2dPipeline
impl Send for Mesh2dPipeline
impl Sync for Mesh2dPipeline
impl Unpin for Mesh2dPipeline
impl UnwindSafe for Mesh2dPipeline
Blanket Implementations§
source§impl<T, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<Image>) -> U
Return the
T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist.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
source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.