pub struct Device(/* private fields */);Implementations§
Source§impl Device
impl Device
pub fn get_immediate_context(&self) -> DeviceContext
pub fn create_deferred_context(&self) -> Result<DeviceContext>
pub fn create_sampler_state(&self, desc: &SamplerDesc) -> Result<SamplerState>
pub fn create_buffer( &self, desc: &BufferDesc, initial_data: Option<&[u8]>, ) -> Result<Buffer>
pub fn create_texture1d( &self, desc: &Texture1dDesc, initial_data: Option<&[D3D11_SUBRESOURCE_DATA]>, ) -> Result<Texture1D>
pub fn create_texture2d( &self, desc: &Texture2dDesc, initial_data: Option<&[D3D11_SUBRESOURCE_DATA]>, ) -> Result<Texture2D>
pub fn create_texture3d( &self, desc: &Texture3dDesc, initial_data: Option<&[D3D11_SUBRESOURCE_DATA]>, ) -> Result<Texture3D>
pub fn create_vertex_shader(&self, bytecode: &[u8]) -> Result<VertexShader>
pub fn create_pixel_shader(&self, bytecode: &[u8]) -> Result<PixelShader>
pub fn create_geometry_shader(&self, bytecode: &[u8]) -> Result<GeometryShader>
pub fn create_hull_shader(&self, bytecode: &[u8]) -> Result<HullShader>
pub fn create_domain_shader(&self, bytecode: &[u8]) -> Result<DomainShader>
pub fn create_compute_shader(&self, bytecode: &[u8]) -> Result<ComputeShader>
Sourcepub fn create_render_target_view(
&self,
resource: &impl Resource,
desc: Option<&RenderTargetViewDesc>,
) -> Result<RenderTargetView>
pub fn create_render_target_view( &self, resource: &impl Resource, desc: Option<&RenderTargetViewDesc>, ) -> Result<RenderTargetView>
Creates a RenderTargetView for the given resource
Set desc to None to create a view that accesses all of the subresources in mipmap level 0
pub fn create_depth_stencil_view( &self, resource: &impl Resource, desc: Option<&DepthStencilViewDesc>, ) -> Result<DepthStencilView>
pub fn create_shader_resource_view( &self, resource: &impl Resource, desc: impl OptionalParam<Output = ShaderResourceViewDesc>, ) -> Result<ShaderResourceView>
pub fn create_unordered_access_view( &self, resource: &impl Resource, desc: impl OptionalParam<Output = UnorderedAccessViewDesc>, ) -> Result<UnorderedAccessView>
pub fn create_input_layout( &self, desc: &[InputElementDesc], shader_bytecode: &[u8], ) -> Result<InputLayout>
pub fn create_rasterizer_state( &self, desc: &RasterizerDesc, ) -> Result<RasterizerState>
pub fn create_depth_stencil_state( &self, desc: &DepthStencilDesc, ) -> Result<DepthStencilState>
pub fn create_blend_state(&self, desc: &BlendDesc) -> Result<BlendState>
pub fn create_query(&self, desc: &QueryDesc) -> Result<Query>
pub fn check_format_support(&self, format: Format) -> FormatSupport
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnsafeUnpin for Device
impl UnwindSafe for Device
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