pub enum Command<RenderBackend: Backend> {
    BeginRecording,
    SetViewports {
        start_at: u32,
        viewports: Vec<ViewPort>,
    },
    SetScissors {
        start_at: u32,
        viewports: Vec<ViewPort>,
    },
    BeginRenderPass {
        render_pass: Rc<RenderPass<RenderBackend>>,
        surface: Rc<Surface<RenderBackend>>,
        frame_buffer: Rc<Framebuffer<RenderBackend>>,
        viewport: ViewPort,
    },
    EndRenderPass,
    AttachGraphicsPipeline {
        pipeline: Rc<RenderPipeline<RenderBackend>>,
    },
    Draw {
        vertices: Range<u32>,
    },
    PushConstants {
        pipeline: Rc<RenderPipeline<RenderBackend>>,
        stage: PipelineStage,
        offset: u32,
        bytes: Vec<u32>,
    },
    BindVertexBuffer {
        buffer: Rc<Buffer<RenderBackend>>,
    },
    EndRecording,
}
Expand description

Enumeration for issuing commands to a CommandBuffer allocated on the GPU. The enumerations are evaluated upon being issued to an active command buffer and correspond to lower level function calls.

Variants§

§

BeginRecording

Begins recording commands to the GPU. A primary command buffer can only issue this command once.

§

SetViewports

Fields

§start_at: u32
§viewports: Vec<ViewPort>
§

SetScissors

Fields

§start_at: u32
§viewports: Vec<ViewPort>
§

BeginRenderPass

Fields

§render_pass: Rc<RenderPass<RenderBackend>>
§surface: Rc<Surface<RenderBackend>>
§frame_buffer: Rc<Framebuffer<RenderBackend>>
§viewport: ViewPort
§

EndRenderPass

Ends a currently active render pass.

§

AttachGraphicsPipeline

Fields

§pipeline: Rc<RenderPipeline<RenderBackend>>
§

Draw

Fields

§vertices: Range<u32>
§

PushConstants

Fields

§pipeline: Rc<RenderPipeline<RenderBackend>>
§offset: u32
§bytes: Vec<u32>
§

BindVertexBuffer

Fields

§buffer: Rc<Buffer<RenderBackend>>
§

EndRecording

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.