Trait gfx_core::draw::CommandBuffer
[−]
[src]
pub trait CommandBuffer<R: Resources> { fn clone_empty(&self) -> Self; fn reset(&mut self); fn bind_pipeline_state(&mut self, R::PipelineStateObject); fn bind_vertex_buffers(&mut self, VertexBufferSet<R>); fn bind_constant_buffers(&mut self, &[ConstantBufferParam<R>]); fn bind_global_constant(&mut self, Location, UniformValue); fn bind_resource_views(&mut self, &[ResourceViewParam<R>]); fn bind_unordered_views(&mut self, &[UnorderedViewParam<R>]); fn bind_samplers(&mut self, &[SamplerParam<R>]); fn bind_pixel_targets(&mut self, PixelTargetSet<R>); fn bind_index(&mut self, R::Buffer, IndexType); fn set_scissor(&mut self, Rect); fn set_ref_values(&mut self, RefValues); fn update_buffer(&mut self, R::Buffer, data: &[u8], offset: usize); fn update_texture(&mut self, R::Texture, Kind, Option<CubeFace>, data: &[u8], RawImageInfo); fn generate_mipmap(&mut self, R::ShaderResourceView); fn clear_color(&mut self, R::RenderTargetView, ClearColor); fn clear_depth_stencil(&mut self, R::DepthStencilView, Option<Depth>, Option<Stencil>); fn call_draw(&mut self, VertexCount, VertexCount, InstanceOption); fn call_draw_indexed(&mut self, VertexCount, VertexCount, VertexCount, InstanceOption); }
An interface of the abstract command buffer. It collects commands in an efficient API-specific manner, to be ready for execution on the device.
Required Methods
fn clone_empty(&self) -> Self
Clone as an empty buffer
fn reset(&mut self)
Reset the command buffer contents, retain the allocated storage
fn bind_pipeline_state(&mut self, R::PipelineStateObject)
Bind a pipeline state object
fn bind_vertex_buffers(&mut self, VertexBufferSet<R>)
Bind a complete set of vertex buffers
fn bind_constant_buffers(&mut self, &[ConstantBufferParam<R>])
Bind a complete set of constant buffers
fn bind_global_constant(&mut self, Location, UniformValue)
Bind a global constant
fn bind_resource_views(&mut self, &[ResourceViewParam<R>])
Bind a complete set of shader resource views
fn bind_unordered_views(&mut self, &[UnorderedViewParam<R>])
Bind a complete set of unordered access views
fn bind_samplers(&mut self, &[SamplerParam<R>])
Bind a complete set of samplers
fn bind_pixel_targets(&mut self, PixelTargetSet<R>)
Bind a complete set of pixel targets, including multiple colors views and an optional depth/stencil view.
fn bind_index(&mut self, R::Buffer, IndexType)
Bind an index buffer
fn set_scissor(&mut self, Rect)
Set scissor rectangle
fn set_ref_values(&mut self, RefValues)
Set reference values for the blending and stencil front/back
fn update_buffer(&mut self, R::Buffer, data: &[u8], offset: usize)
Update a vertex/index/uniform buffer
fn update_texture(&mut self, R::Texture, Kind, Option<CubeFace>, data: &[u8], RawImageInfo)
Update a texture
fn generate_mipmap(&mut self, R::ShaderResourceView)
fn clear_color(&mut self, R::RenderTargetView, ClearColor)
Clear color target
fn clear_depth_stencil(&mut self, R::DepthStencilView, Option<Depth>, Option<Stencil>)
fn call_draw(&mut self, VertexCount, VertexCount, InstanceOption)
Draw a primitive
fn call_draw_indexed(&mut self, VertexCount, VertexCount, VertexCount, InstanceOption)
Draw a primitive with index buffer
Implementors
impl CommandBuffer<DummyResources> for DummyCommandBuffer