pub trait Buffer<R: Resources>: 'static + Send {
Show 23 methods
// Required methods
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 copy_buffer(
&mut self,
src: R::Buffer,
dst: R::Buffer,
src_offset_bytes: usize,
dst_offset_bytes: usize,
size_bytes: usize,
);
fn copy_buffer_to_texture(
&mut self,
src: R::Buffer,
src_offset_bytes: usize,
dst: TextureCopyRegion<R::Texture>,
);
fn copy_texture_to_buffer(
&mut self,
src: TextureCopyRegion<R::Texture>,
dst: R::Buffer,
dst_offset_bytes: usize,
);
fn copy_texture_to_texture(
&mut self,
src: TextureCopyRegion<R::Texture>,
dst: TextureCopyRegion<R::Texture>,
);
fn update_buffer(&mut self, _: R::Buffer, data: &[u8], offset: usize);
fn update_texture(&mut self, _: TextureCopyRegion<R::Texture>, data: &[u8]);
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,
_: Option<InstanceParams>,
);
fn call_draw_indexed(
&mut self,
_: VertexCount,
_: VertexCount,
_: VertexCount,
_: Option<InstanceParams>,
);
}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::PipelineStateObject)
fn bind_pipeline_state(&mut self, _: R::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, _: Location, _: UniformValue)
fn bind_global_constant(&mut self, _: Location, _: 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::Buffer, _: IndexType)
fn bind_index(&mut self, _: R::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::Buffer,
dst: R::Buffer,
src_offset_bytes: usize,
dst_offset_bytes: usize,
size_bytes: usize,
)
fn copy_buffer( &mut self, src: R::Buffer, dst: R::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::Buffer,
src_offset_bytes: usize,
dst: TextureCopyRegion<R::Texture>,
)
fn copy_buffer_to_texture( &mut self, src: R::Buffer, src_offset_bytes: usize, dst: TextureCopyRegion<R::Texture>, )
Copy part of a buffer to a texture
Sourcefn copy_texture_to_buffer(
&mut self,
src: TextureCopyRegion<R::Texture>,
dst: R::Buffer,
dst_offset_bytes: usize,
)
fn copy_texture_to_buffer( &mut self, src: TextureCopyRegion<R::Texture>, dst: R::Buffer, dst_offset_bytes: usize, )
Copy part of a texture to a buffer
Sourcefn copy_texture_to_texture(
&mut self,
src: TextureCopyRegion<R::Texture>,
dst: TextureCopyRegion<R::Texture>,
)
fn copy_texture_to_texture( &mut self, src: TextureCopyRegion<R::Texture>, dst: TextureCopyRegion<R::Texture>, )
Copy part of one texture into another
Sourcefn update_buffer(&mut self, _: R::Buffer, data: &[u8], offset: usize)
fn update_buffer(&mut self, _: R::Buffer, data: &[u8], offset: usize)
Update a vertex/index/uniform buffer
Sourcefn update_texture(&mut self, _: TextureCopyRegion<R::Texture>, data: &[u8])
fn update_texture(&mut self, _: TextureCopyRegion<R::Texture>, data: &[u8])
Update a texture
fn generate_mipmap(&mut self, _: R::ShaderResourceView)
Sourcefn clear_color(&mut self, _: R::RenderTargetView, _: ClearColor)
fn clear_color(&mut self, _: R::RenderTargetView, _: ClearColor)
Clear color target
fn clear_depth_stencil( &mut self, _: R::DepthStencilView, _: Option<Depth>, _: Option<Stencil>, )
Sourcefn call_draw(
&mut self,
_: VertexCount,
_: VertexCount,
_: Option<InstanceParams>,
)
fn call_draw( &mut self, _: VertexCount, _: VertexCount, _: Option<InstanceParams>, )
Draw a primitive
Sourcefn call_draw_indexed(
&mut self,
_: VertexCount,
_: VertexCount,
_: VertexCount,
_: Option<InstanceParams>,
)
fn call_draw_indexed( &mut self, _: VertexCount, _: VertexCount, _: VertexCount, _: Option<InstanceParams>, )
Draw a primitive with index buffer