Struct gfx::device::command::CommandBuffer
[−]
[src]
pub struct CommandBuffer<R: Resources> { // some fields omitted }
Generic command buffer to be used by multiple backends
Methods
impl<R> CommandBuffer<R> where R: Resources
[src]
Trait Implementations
impl<R> CommandBuffer<R> for CommandBuffer<R> where R: Resources
[src]
fn new() -> CommandBuffer<R>
An empty constructor
fn clear(&mut self)
Clear the command buffer contents, retain the allocated storage
fn bind_program(&mut self, prog: R::Program)
Bind a shader program
fn bind_array_buffer(&mut self, vao: R::ArrayBuffer)
Bind an array buffer object
fn bind_attribute(&mut self, slot: AttributeSlot, buf: R::Buffer, format: Format)
Bind a vertex attribute
fn bind_index(&mut self, buf: R::Buffer)
Bind an index buffer
fn bind_frame_buffer(&mut self, access: Access, fbo: R::FrameBuffer, gamma: Gamma)
Bind a frame buffer object
fn unbind_target(&mut self, access: Access, tar: Target)
Unbind any surface from the specified target slot
fn bind_target_surface(&mut self, access: Access, tar: Target, suf: R::Surface)
Bind a surface to the specified target slot
fn bind_target_texture(&mut self, access: Access, tar: Target, tex: R::Texture, level: Level, layer: Option<Layer>)
Bind a level of the texture to the specified target slot
fn bind_uniform_block(&mut self, prog: R::Program, slot: UniformBufferSlot, index: UniformBlockIndex, buf: R::Buffer)
Bind a uniform block
fn bind_uniform(&mut self, loc: Location, value: UniformValue)
Bind a single uniform in the default block
fn bind_texture(&mut self, slot: TextureSlot, kind: Kind, tex: R::Texture, sampler: Option<(R::Sampler, SamplerInfo)>)
Bind a texture
fn set_draw_color_buffers(&mut self, num: usize)
Select, which color buffers are going to be targetted by the shader
fn set_primitive(&mut self, prim: Primitive)
Set primitive topology
fn set_viewport(&mut self, view: Rect)
Set viewport rectangle
fn set_multi_sample(&mut self, ms: Option<MultiSample>)
Set multi-sampling state
fn set_scissor(&mut self, rect: Option<Rect>)
Set scissor test
fn set_depth_stencil(&mut self, depth: Option<Depth>, stencil: Option<Stencil>, cull: CullFace)
Set depth and stencil states
fn set_blend(&mut self, blend: Option<Blend>)
Set blend state
fn set_color_mask(&mut self, mask: ColorMask)
Set output color mask for all targets
fn update_buffer(&mut self, buf: R::Buffer, data: DataPointer, offset_bytes: usize)
Update a vertex/index/uniform buffer
fn update_texture(&mut self, kind: Kind, tex: R::Texture, info: ImageInfo, data: DataPointer)
Update a texture region
fn call_clear(&mut self, data: ClearData, mask: Mask)
Clear target surfaces
fn call_draw(&mut self, ptype: PrimitiveType, start: VertexCount, count: VertexCount, instances: InstanceOption)
Draw a primitive
fn call_draw_indexed(&mut self, ptype: PrimitiveType, itype: IndexType, start: VertexCount, count: VertexCount, base: VertexCount, instances: InstanceOption)
Draw a primitive with index buffer
fn call_blit(&mut self, s_rect: Rect, d_rect: Rect, mirror: Mirror, mask: Mask)
Blit from one target to another