Struct bevy_core_pipeline::core_3d::Opaque3d
source · pub struct Opaque3d {
pub key: Opaque3dBinKey,
pub representative_entity: Entity,
pub batch_range: Range<u32>,
pub extra_index: PhaseItemExtraIndex,
}
Expand description
Opaque 3D BinnedPhaseItem
s.
Fields§
§key: Opaque3dBinKey
The key, which determines which can be batched.
representative_entity: Entity
An entity from which data will be fetched, including the mesh if applicable.
batch_range: Range<u32>
The ranges of instances.
extra_index: PhaseItemExtraIndex
An extra index, which is either a dynamic offset or an index in the indirect parameters list.
Trait Implementations§
source§impl BinnedPhaseItem for Opaque3d
impl BinnedPhaseItem for Opaque3d
§type BinKey = Opaque3dBinKey
type BinKey = Opaque3dBinKey
The key used for binning
PhaseItem
s into bins. Order the members of
BinnedPhaseItem::BinKey
by the order of binding for best
performance. For example, pipeline id, draw function id, mesh asset id,
lowest variable bind group id such as the material bind group id, and
its dynamic offsets if any, next bind group and offsets, etc. This
reduces the need for rebinding between bins and improves performance.source§impl CachedRenderPipelinePhaseItem for Opaque3d
impl CachedRenderPipelinePhaseItem for Opaque3d
source§fn cached_pipeline(&self) -> CachedRenderPipelineId
fn cached_pipeline(&self) -> CachedRenderPipelineId
The id of the render pipeline, cached in the
PipelineCache
, that will be used to draw
this phase item.source§impl PhaseItem for Opaque3d
impl PhaseItem for Opaque3d
source§fn draw_function(&self) -> DrawFunctionId
fn draw_function(&self) -> DrawFunctionId
Specifies the
Draw
function used to render the item.source§fn batch_range(&self) -> &Range<u32>
fn batch_range(&self) -> &Range<u32>
The range of instances that the batch covers. After doing a batched draw, batch range
length phase items will be skipped. This design is to avoid having to restructure the
render phase unnecessarily.
fn batch_range_mut(&mut self) -> &mut Range<u32>
source§fn extra_index(&self) -> PhaseItemExtraIndex
fn extra_index(&self) -> PhaseItemExtraIndex
Returns the
PhaseItemExtraIndex
. Read moresource§fn batch_range_and_extra_index_mut(
&mut self
) -> (&mut Range<u32>, &mut PhaseItemExtraIndex)
fn batch_range_and_extra_index_mut( &mut self ) -> (&mut Range<u32>, &mut PhaseItemExtraIndex)
Returns a pair of mutable references to both the batch range and extra
index.
source§const AUTOMATIC_BATCHING: bool = true
const AUTOMATIC_BATCHING: bool = true
Whether or not this
PhaseItem
should be subjected to automatic batching. (Default: true
)Auto Trait Implementations§
impl Freeze for Opaque3d
impl RefUnwindSafe for Opaque3d
impl Send for Opaque3d
impl Sync for Opaque3d
impl Unpin for Opaque3d
impl UnwindSafe for Opaque3d
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<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> 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.