Trait gfx::CommandBuffer
source · pub trait CommandBuffer<R>: 'static + Sendwhere
R: Resources,{
Show 23 methods
// Required methods
fn reset(&mut self);
fn bind_pipeline_state(&mut self, _: <R as Resources>::PipelineStateObject);
fn bind_vertex_buffers(&mut self, _: VertexBufferSet<R>);
fn bind_constant_buffers(&mut self, _: &[ConstantBufferParam<R>]);
fn bind_global_constant(&mut self, _: usize, _: 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 as Resources>::Buffer, _: IndexType);
fn set_scissor(&mut self, _: Rect);
fn set_ref_values(&mut self, _: RefValues);
fn copy_buffer(
&mut self,
src: <R as Resources>::Buffer,
dst: <R as Resources>::Buffer,
src_offset_bytes: usize,
dst_offset_bytes: usize,
size_bytes: usize
);
fn copy_buffer_to_texture(
&mut self,
src: <R as Resources>::Buffer,
src_offset_bytes: usize,
dst: TextureCopyRegion<<R as Resources>::Texture>
);
fn copy_texture_to_buffer(
&mut self,
src: TextureCopyRegion<<R as Resources>::Texture>,
dst: <R as Resources>::Buffer,
dst_offset_bytes: usize
);
fn copy_texture_to_texture(
&mut self,
src: TextureCopyRegion<<R as Resources>::Texture>,
dst: TextureCopyRegion<<R as Resources>::Texture>
);
fn update_buffer(
&mut self,
_: <R as Resources>::Buffer,
data: &[u8],
offset: usize
);
fn update_texture(
&mut self,
_: TextureCopyRegion<<R as Resources>::Texture>,
data: &[u8]
);
fn generate_mipmap(&mut self, _: <R as Resources>::ShaderResourceView);
fn clear_color(
&mut self,
_: <R as Resources>::RenderTargetView,
_: ClearColor
);
fn clear_depth_stencil(
&mut self,
_: <R as Resources>::DepthStencilView,
_: Option<f32>,
_: Option<u8>
);
fn call_draw(&mut self, _: u32, _: u32, _: Option<(u32, u32)>);
fn call_draw_indexed(&mut self, _: u32, _: u32, _: u32, _: Option<(u32, u32)>);
}
Expand description
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§
sourcefn bind_pipeline_state(&mut self, _: <R as Resources>::PipelineStateObject)
fn bind_pipeline_state(&mut self, _: <R as Resources>::PipelineStateObject)
Bind a pipeline state object
sourcefn bind_vertex_buffers(&mut self, _: VertexBufferSet<R>)
fn bind_vertex_buffers(&mut self, _: VertexBufferSet<R>)
Bind a complete set of vertex buffers
sourcefn bind_constant_buffers(&mut self, _: &[ConstantBufferParam<R>])
fn bind_constant_buffers(&mut self, _: &[ConstantBufferParam<R>])
Bind a complete set of constant buffers
sourcefn bind_global_constant(&mut self, _: usize, _: UniformValue)
fn bind_global_constant(&mut self, _: usize, _: UniformValue)
Bind a global constant
sourcefn bind_resource_views(&mut self, _: &[ResourceViewParam<R>])
fn bind_resource_views(&mut self, _: &[ResourceViewParam<R>])
Bind a complete set of shader resource views
sourcefn bind_unordered_views(&mut self, _: &[UnorderedViewParam<R>])
fn bind_unordered_views(&mut self, _: &[UnorderedViewParam<R>])
Bind a complete set of unordered access views
sourcefn bind_samplers(&mut self, _: &[SamplerParam<R>])
fn bind_samplers(&mut self, _: &[SamplerParam<R>])
Bind a complete set of samplers
sourcefn bind_pixel_targets(&mut self, _: PixelTargetSet<R>)
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.
sourcefn bind_index(&mut self, _: <R as Resources>::Buffer, _: IndexType)
fn bind_index(&mut self, _: <R as Resources>::Buffer, _: IndexType)
Bind an index buffer
sourcefn set_scissor(&mut self, _: Rect)
fn set_scissor(&mut self, _: Rect)
Set scissor rectangle
sourcefn set_ref_values(&mut self, _: RefValues)
fn set_ref_values(&mut self, _: RefValues)
Set reference values for the blending and stencil front/back
sourcefn copy_buffer(
&mut self,
src: <R as Resources>::Buffer,
dst: <R as Resources>::Buffer,
src_offset_bytes: usize,
dst_offset_bytes: usize,
size_bytes: usize
)
fn copy_buffer( &mut self, src: <R as Resources>::Buffer, dst: <R as Resources>::Buffer, src_offset_bytes: usize, dst_offset_bytes: usize, size_bytes: usize )
Copy part of a buffer to another
sourcefn copy_buffer_to_texture(
&mut self,
src: <R as Resources>::Buffer,
src_offset_bytes: usize,
dst: TextureCopyRegion<<R as Resources>::Texture>
)
fn copy_buffer_to_texture( &mut self, src: <R as Resources>::Buffer, src_offset_bytes: usize, dst: TextureCopyRegion<<R as Resources>::Texture> )
Copy part of a buffer to a texture
sourcefn copy_texture_to_buffer(
&mut self,
src: TextureCopyRegion<<R as Resources>::Texture>,
dst: <R as Resources>::Buffer,
dst_offset_bytes: usize
)
fn copy_texture_to_buffer( &mut self, src: TextureCopyRegion<<R as Resources>::Texture>, dst: <R as Resources>::Buffer, dst_offset_bytes: usize )
Copy part of a texture to a buffer
sourcefn copy_texture_to_texture(
&mut self,
src: TextureCopyRegion<<R as Resources>::Texture>,
dst: TextureCopyRegion<<R as Resources>::Texture>
)
fn copy_texture_to_texture( &mut self, src: TextureCopyRegion<<R as Resources>::Texture>, dst: TextureCopyRegion<<R as Resources>::Texture> )
Copy part of one texture into another
sourcefn update_buffer(
&mut self,
_: <R as Resources>::Buffer,
data: &[u8],
offset: usize
)
fn update_buffer( &mut self, _: <R as Resources>::Buffer, data: &[u8], offset: usize )
Update a vertex/index/uniform buffer
sourcefn update_texture(
&mut self,
_: TextureCopyRegion<<R as Resources>::Texture>,
data: &[u8]
)
fn update_texture( &mut self, _: TextureCopyRegion<<R as Resources>::Texture>, data: &[u8] )
Update a texture
fn generate_mipmap(&mut self, _: <R as Resources>::ShaderResourceView)
sourcefn clear_color(&mut self, _: <R as Resources>::RenderTargetView, _: ClearColor)
fn clear_color(&mut self, _: <R as Resources>::RenderTargetView, _: ClearColor)
Clear color target