pub struct DeviceContext(/* private fields */);Implementations§
Source§impl DeviceContext
impl DeviceContext
pub fn draw(&self, vertex_count: u32, start_vertex_location: u32)
pub fn draw_auto(&self)
pub fn draw_indexed( &self, index_count: u32, start_index_location: u32, base_vertex_location: i32, )
pub fn draw_indexed_instanced( &self, index_count_per_instance: u32, instance_count: u32, start_index_location: u32, base_vertex_location: i32, start_instance_location: u32, )
pub fn draw_indexed_instanced_indirect( &self, buffer_for_args: &Buffer, aligned_byte_offset_for_args: u32, )
pub fn draw_instanced( &self, vertex_count_per_instance: u32, instance_count: u32, start_vertex_location: u32, start_instance_location: u32, )
pub fn draw_instanced_indirect( &self, buffer_for_args: &Buffer, aligned_byte_offset_for_args: u32, )
Source§impl DeviceContext
impl DeviceContext
pub fn input_assembler_set_primitive_topology( &self, topology: PrimitiveTopology, )
pub fn input_assembler_set_input_layout( &self, layout: impl OptionalParam<Output = InputLayout>, )
pub fn input_assembler_set_vertex_buffers( &self, start_slot: u32, buffers: &[Option<&Buffer>], strides: Option<&[u32]>, offsets: Option<&[u32]>, ) -> Result<()>
pub fn input_assembler_set_index_buffer( &self, buffer: impl OptionalParam<Output = Buffer>, format: Format, offset: u32, )
Source§impl DeviceContext
impl DeviceContext
pub fn output_merger_set_render_targets( &self, render_target_views: &[Option<&RenderTargetView>], depth_stencil_view: Option<&DepthStencilView>, )
pub fn output_merger_get_render_targets( &self, ) -> ([Option<RenderTargetView>; 8], Option<DepthStencilView>)
pub fn output_merger_set_blend_state( &self, blend_state: impl OptionalParam<Output = BlendState>, blend_factor: Option<&[f32; 4]>, sample_mask: u32, )
pub fn output_merger_set_depth_stencil_state( &self, depth_stencil_state: impl OptionalParam<Output = DepthStencilState>, stencil_ref: u32, )
Source§impl DeviceContext
impl DeviceContext
pub fn begin(&self, async_: &impl Asynchronous)
pub fn end(&self, async_: &impl Asynchronous)
Source§impl DeviceContext
impl DeviceContext
pub fn rasterizer_set_viewports(&self, viewports: &[Viewport])
pub fn rasterizer_get_viewports(&self) -> [Viewport; 8]
pub fn rasterizer_set_scissor_rects(&self, rects: &[Rect])
pub fn rasterizer_set_state( &self, state: impl OptionalParam<Output = RasterizerState>, )
Source§impl DeviceContext
impl DeviceContext
pub const SAMPLER_SLOT_COUNT: usize
pub const SHADER_RESOURCE_SLOT_COUNT: usize
pub const CONSTANT_BUFFER_SLOT_COUNT: usize
pub fn vertex_set_constant_buffers( &self, start_slot: u32, buffers: &[Option<&Buffer>], )
pub fn pixel_set_constant_buffers( &self, start_slot: u32, buffers: &[Option<&Buffer>], )
pub fn geometry_set_constant_buffers( &self, start_slot: u32, buffers: &[Option<&Buffer>], )
pub fn hull_set_constant_buffers( &self, start_slot: u32, buffers: &[Option<&Buffer>], )
pub fn domain_set_constant_buffers( &self, start_slot: u32, buffers: &[Option<&Buffer>], )
pub fn compute_set_constant_buffers( &self, start_slot: u32, buffers: &[Option<&Buffer>], )
pub fn vertex_set_constant_buffers1( &self, start_slot: u32, buffers: &[Option<&Buffer>], first_constant: Option<&[u32]>, num_constants: Option<&[u32]>, )
pub fn pixel_set_constant_buffers1( &self, start_slot: u32, buffers: &[Option<&Buffer>], first_constant: Option<&[u32]>, num_constants: Option<&[u32]>, )
pub fn geometry_set_constant_buffers1( &self, start_slot: u32, buffers: &[Option<&Buffer>], first_constant: Option<&[u32]>, num_constants: Option<&[u32]>, )
pub fn hull_set_constant_buffers1( &self, start_slot: u32, buffers: &[Option<&Buffer>], first_constant: Option<&[u32]>, num_constants: Option<&[u32]>, )
pub fn domain_set_constant_buffers1( &self, start_slot: u32, buffers: &[Option<&Buffer>], first_constant: Option<&[u32]>, num_constants: Option<&[u32]>, )
pub fn compute_set_constant_buffers1( &self, start_slot: u32, buffers: &[Option<&Buffer>], first_constant: Option<&[u32]>, num_constants: Option<&[u32]>, )
pub fn vertex_get_constant_buffers(&self) -> [Option<Buffer>; 14]
pub fn pixel_get_constant_buffers(&self) -> [Option<Buffer>; 14]
pub fn geometry_get_constant_buffers(&self) -> [Option<Buffer>; 14]
pub fn hull_get_constant_buffers(&self) -> [Option<Buffer>; 14]
pub fn domain_get_constant_buffers(&self) -> [Option<Buffer>; 14]
pub fn compute_get_constant_buffers(&self) -> [Option<Buffer>; 14]
pub fn vertex_set_samplers( &self, start_slot: u32, samplers: &[Option<&SamplerState>], )
pub fn pixel_set_samplers( &self, start_slot: u32, samplers: &[Option<&SamplerState>], )
pub fn geometry_set_samplers( &self, start_slot: u32, samplers: &[Option<&SamplerState>], )
pub fn hull_set_samplers( &self, start_slot: u32, samplers: &[Option<&SamplerState>], )
pub fn domain_set_samplers( &self, start_slot: u32, samplers: &[Option<&SamplerState>], )
pub fn compute_set_samplers( &self, start_slot: u32, samplers: &[Option<&SamplerState>], )
pub fn vertex_get_samplers(&self) -> [Option<SamplerState>; 16]
pub fn pixel_get_samplers(&self) -> [Option<SamplerState>; 16]
pub fn geometry_get_samplers(&self) -> [Option<SamplerState>; 16]
pub fn hull_get_samplers(&self) -> [Option<SamplerState>; 16]
pub fn domain_get_samplers(&self) -> [Option<SamplerState>; 16]
pub fn compute_get_samplers(&self) -> [Option<SamplerState>; 16]
pub fn vertex_set_shader_resources( &self, start_slot: u32, views: &[Option<&ShaderResourceView>], )
pub fn pixel_set_shader_resources( &self, start_slot: u32, views: &[Option<&ShaderResourceView>], )
pub fn geometry_set_shader_resources( &self, start_slot: u32, views: &[Option<&ShaderResourceView>], )
pub fn hull_set_shader_resources( &self, start_slot: u32, views: &[Option<&ShaderResourceView>], )
pub fn domain_set_shader_resources( &self, start_slot: u32, views: &[Option<&ShaderResourceView>], )
pub fn compute_set_shader_resources( &self, start_slot: u32, views: &[Option<&ShaderResourceView>], )
pub fn vertex_get_shader_resources(&self) -> [Option<ShaderResourceView>; 128]
pub fn pixel_get_shader_resources(&self) -> [Option<ShaderResourceView>; 128]
pub fn geometry_get_shader_resources(&self) -> [Option<ShaderResourceView>; 128]
pub fn hull_get_shader_resources(&self) -> [Option<ShaderResourceView>; 128]
pub fn domain_get_shader_resources(&self) -> [Option<ShaderResourceView>; 128]
pub fn compute_get_shader_resources(&self) -> [Option<ShaderResourceView>; 128]
pub fn compute_set_unordered_access_views( &self, start_slot: u32, views: &[Option<&UnorderedAccessView>], initial_counts: Option<&[u32]>, )
pub fn vertex_set_shader<S>(&self, shader: S)where
S: OptionalParam<Output = VertexShader>,
pub fn pixel_set_shader<S>(&self, shader: S)where
S: OptionalParam<Output = PixelShader>,
pub fn geometry_set_shader<S>(&self, shader: S)where
S: OptionalParam<Output = GeometryShader>,
pub fn hull_set_shader<S>(&self, shader: S)where
S: OptionalParam<Output = HullShader>,
pub fn domain_set_shader<S>(&self, shader: S)where
S: OptionalParam<Output = DomainShader>,
pub fn compute_set_shader<S>(&self, shader: S)where
S: OptionalParam<Output = ComputeShader>,
Source§impl DeviceContext
impl DeviceContext
pub fn get_device(&self) -> Device
pub fn get_user_defined_annotation(&self) -> UserDefinedAnnotation
pub fn finish_command_list(&self, restore_state: bool) -> Result<CommandList>
pub fn execute_command_list( &self, command_list: &CommandList, restore_state: bool, )
pub fn clear_render_target_view(&self, rtv: &RenderTargetView, color: &[f32; 4])
pub fn clear_depth_stencil_view( &self, dsv: &DepthStencilView, flags: ClearFlags, depth: f32, stencil: u8, )
pub fn set_resource_min_lod(&self, resource: &impl Resource, min_lod: f32)
pub fn flush(&self)
pub fn clear_state(&self)
pub fn get_type(&self) -> DeviceContextType
Sourcepub fn map<T: Resource + Clone>(
&self,
resource: &T,
subresource: u32,
map_type: MapType,
do_not_wait: bool,
) -> Result<SubresourceMapGuard<T>>
pub fn map<T: Resource + Clone>( &self, resource: &T, subresource: u32, map_type: MapType, do_not_wait: bool, ) -> Result<SubresourceMapGuard<T>>
Maps a resource to a CPU-accessible memory region.
SAFETY: This function is safe to call, but operations on the mapped memory region are not.
pub unsafe fn map_unchecked<T: Resource + Clone>( &self, resource: &T, subresource: u32, map_type: MapType, do_not_wait: bool, ) -> Result<MappedSubresource>
pub fn unmap<T: Resource + Clone>(&self, resource: &T, subresource: u32)
pub unsafe fn get_data<T: Sized>( &self, query: &impl Asynchronous, dont_flush: bool, ) -> GetDataResult<T>
pub fn is_query_ready(&self, query: &impl Asynchronous) -> bool
pub fn copy_resource<Src: Resource, Dest: Resource>( &self, src: &Src, dst: &Dest, )
pub fn copy_subresource_region<Src: Resource, Dest: Resource>( &self, src: &Src, src_subresource: u32, src_box: Option<&Box3D>, dst: &Dest, dst_subresource: u32, dst_pos: (u32, u32, u32), )
pub fn dispatch(&self, x: u32, y: u32, z: u32)
Trait Implementations§
Source§impl Clone for DeviceContext
impl Clone for DeviceContext
Source§fn clone(&self) -> DeviceContext
fn clone(&self) -> DeviceContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl DeviceChild for DeviceContext
impl DeviceChild for DeviceContext
fn as_device_child(&self) -> &ID3D11DeviceChild
fn get_device(&self) -> Device
fn set_debug_name(&self, name: impl AsRef<str>)
Auto Trait Implementations§
impl Freeze for DeviceContext
impl RefUnwindSafe for DeviceContext
impl Send for DeviceContext
impl Sync for DeviceContext
impl Unpin for DeviceContext
impl UnsafeUnpin for DeviceContext
impl UnwindSafe for DeviceContext
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more