pub struct CommandBuffer {
    commands: Vec<Command>,
    current_spatial_node_index: SpatialNodeIndex,
}Expand description
A list of commands describing how to draw a primitive list.
Fields§
§commands: Vec<Command>The encoded drawing commands.
current_spatial_node_index: SpatialNodeIndexCached current spatial node.
Implementations§
Source§impl CommandBuffer
 
impl CommandBuffer
Sourcepub fn set_segments(&mut self, segments: &[QuadSegment])
 
pub fn set_segments(&mut self, segments: &[QuadSegment])
Push a list of segments in to the cmd buffer
Sourcepub fn add_prim(
    &mut self,
    prim_cmd: &PrimitiveCommand,
    spatial_node_index: SpatialNodeIndex,
)
 
pub fn add_prim( &mut self, prim_cmd: &PrimitiveCommand, spatial_node_index: SpatialNodeIndex, )
Add a primitive to the command buffer.
Sourcepub fn add_cmd(&mut self, prim_cmd: &PrimitiveCommand)
 
pub fn add_cmd(&mut self, prim_cmd: &PrimitiveCommand)
Add a cmd to the command buffer.
Sourcepub fn iter_prims<F>(&self, f: &mut F)
 
pub fn iter_prims<F>(&self, f: &mut F)
Iterate the command list, calling a provided closure for each primitive draw command.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CommandBuffer
impl RefUnwindSafe for CommandBuffer
impl Send for CommandBuffer
impl Sync for CommandBuffer
impl Unpin for CommandBuffer
impl UnwindSafe for CommandBuffer
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