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]

[src]

Trait Implementations

impl Buffer<Resources> for CommandBuffer
[src]

[src]

Reset the command buffer contents, retain the allocated storage

[src]

Bind a pipeline state object

[src]

Bind a complete set of vertex buffers

[src]

Bind a complete set of constant buffers

[src]

Bind a global constant

[src]

Bind a complete set of shader resource views

[src]

Bind a complete set of unordered access views

[src]

Bind a complete set of samplers

[src]

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

[src]

Bind an index buffer

[src]

Set scissor rectangle

[src]

Set reference values for the blending and stencil front/back

[src]

Copy part of a buffer to another

[src]

Copy part of a buffer to a texture

[src]

Copy part of a texture to a buffer

[src]

Update a vertex/index/uniform buffer

[src]

Update a texture

[src]

[src]

Clear color target

[src]

[src]

Draw a primitive

[src]

Draw a primitive with index buffer