pub enum PrimitiveCommand {
Simple {
draw_index: Index<PrimitiveDrawHeader>,
},
Complex {
draw_index: Index<PrimitiveDrawHeader>,
gpu_address: GpuBufferAddress,
},
Instance {
draw_index: Index<PrimitiveDrawHeader>,
gpu_buffer_address: GpuBufferAddress,
},
Quad {
pattern: PatternKind,
pattern_input: PatternShaderInput,
src_color_task_id: RenderTaskId,
draw_index: Index<PrimitiveDrawHeader>,
gpu_buffer_address: GpuBufferAddress,
transform_id: GpuTransformId,
quad_flags: QuadFlags,
edge_flags: EdgeMask,
blend_mode: BlendMode,
},
}Expand description
The unpacked equivalent to a Command.
Each variant carries an Index<PrimitiveDrawHeader> identifying which
per-frame draw header to use. While scratch.frame.draws is identity-
indexed by PrimitiveInstanceIndex.0, the numerical value of the draw
index equals the prim instance index; a follow-up will make them
physically distinct when draws becomes push-per-draw.
Variants§
Simple
Fields
§
draw_index: Index<PrimitiveDrawHeader>Complex
Instance
Quad
Fields
§
pattern: PatternKind§
pattern_input: PatternShaderInput§
src_color_task_id: RenderTaskId§
draw_index: Index<PrimitiveDrawHeader>§
gpu_buffer_address: GpuBufferAddress§
transform_id: GpuTransformIdImplementations§
Source§impl PrimitiveCommand
impl PrimitiveCommand
pub fn simple(draw_index: Index<PrimitiveDrawHeader>) -> Self
pub fn complex( draw_index: Index<PrimitiveDrawHeader>, gpu_address: GpuBufferAddress, ) -> Self
pub fn quad( pattern: PatternKind, pattern_input: PatternShaderInput, src_color_task_id: RenderTaskId, draw_index: Index<PrimitiveDrawHeader>, gpu_buffer_address: GpuBufferAddress, transform_id: GpuTransformId, quad_flags: QuadFlags, edge_flags: EdgeMask, blend_mode: BlendMode, ) -> Self
pub fn instance( draw_index: Index<PrimitiveDrawHeader>, gpu_buffer_address: GpuBufferAddress, ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PrimitiveCommand
impl RefUnwindSafe for PrimitiveCommand
impl Send for PrimitiveCommand
impl Sync for PrimitiveCommand
impl Unpin for PrimitiveCommand
impl UnsafeUnpin for PrimitiveCommand
impl UnwindSafe for PrimitiveCommand
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more