pub struct BackendD3D11;
Expand description
When using Direct3D11 for rendering, this contains a number of variables that may be useful for doing advanced rendering tasks. This is the default rendering backend on Windows. https://stereokit.net/Pages/StereoKit/Backend.D3D11.html
§Examples
use stereokit_rust::system::BackendD3D11;
let d3d_context = BackendD3D11::d3d_context();
let d3d_device = BackendD3D11::d3d_device();
if cfg!(target_os = "windows") {
// These are results for a D3D11 environment:
assert_eq!(d3d_context, std::ptr::null_mut());
assert_ne!(d3d_device, std::ptr::null_mut());
} else {
// These are results for a non D3D11 environment:
assert_eq!(d3d_context, std::ptr::null_mut());
assert_eq!(d3d_device, std::ptr::null_mut());
}
Implementations§
Source§impl BackendD3D11
impl BackendD3D11
Sourcepub fn d3d_context() -> *mut c_void
pub fn d3d_context() -> *mut c_void
This is the main ID3D11DeviceContext* StereoKit uses for rendering. https://stereokit.net/Pages/StereoKit/Backend.D3D11/D3DContext.html
see also backend_d3d11_get_d3d_context
Sourcepub fn d3d_device() -> *mut c_void
pub fn d3d_device() -> *mut c_void
This is the main ID3D11Device* StereoKit uses for rendering. https://stereokit.net/Pages/StereoKit/Backend.D3D11/D3DDevice.html
see also backend_d3d11_get_d3d_device
Auto Trait Implementations§
impl Freeze for BackendD3D11
impl RefUnwindSafe for BackendD3D11
impl Send for BackendD3D11
impl Sync for BackendD3D11
impl Unpin for BackendD3D11
impl UnwindSafe for BackendD3D11
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.