Struct gfx_device_gl::CommandBuffer [] [src]

pub struct CommandBuffer {
    pub buf: Vec<Command>,
    pub data: DataBuffer,
    pub display_fb: FrameBuffer,
    // some fields omitted
}

A command buffer abstraction for OpenGL.

Manages a list of commands that will be executed when submitted to a Device. Usually it is best to use a Encoder to manage the command buffer which implements From<CommandBuffer>.

If you want to display your rendered results to a framebuffer created externally, see the display_fb field.

Fields

The framebuffer to use for rendering to the main targets (0 by default).

Use this to set the framebuffer that will be used for the screen display targets created with create_main_targets_raw. Usually you don't need to set this field directly unless your OS doesn't provide a default framebuffer with name 0 and you have to render to a different framebuffer object that can be made visible on the screen (iOS/tvOS need this).

This framebuffer must exist and be configured correctly (with renderbuffer attachments, etc.) so that rendering to it can occur immediately.

Methods

impl CommandBuffer
[src]

Trait Implementations

impl Buffer<Resources> for CommandBuffer
[src]

Reset the command buffer contents, retain the allocated storage

Bind a pipeline state object

Bind a complete set of vertex buffers

Bind a complete set of constant buffers

Bind a global constant

Bind a complete set of shader resource views

Bind a complete set of unordered access views

Bind a complete set of samplers

Bind a complete set of pixel targets, including multiple colors views and an optional depth/stencil view. Read more

Bind an index buffer

Set scissor rectangle

Set reference values for the blending and stencil front/back

Copy part of a buffer to another

Copy part of a buffer to a texture

Copy part of a texture to a buffer

Update a vertex/index/uniform buffer

Update a texture

Clear color target

Draw a primitive

Draw a primitive with index buffer