pub struct Device {
pub d3d_device: ID3D11Device,
pub device: IDirect3DDevice,
pub item: GraphicsCaptureItem,
}Fields§
§d3d_device: ID3D11Device§device: IDirect3DDevice§item: GraphicsCaptureItemImplementations§
Source§impl Device
impl Device
Sourcepub fn new(item: GraphicsCaptureItem) -> Self
pub fn new(item: GraphicsCaptureItem) -> Self
Create a new Device.
other all in common initialize. other is self made case for GraphicsCaptureItem.
Sourcepub fn new_from_displays(display_id: Option<usize>) -> Result<Self>
pub fn new_from_displays(display_id: Option<usize>) -> Result<Self>
Create Device from display id.
§Parameters
- display_id: id of the target display. default is created by MONITOR_DEFAULTTOPRIMARY. display_id range is [1..=len].
Sourcepub fn new_from_window(window_caption: String) -> Result<Self>
pub fn new_from_window(window_caption: String) -> Result<Self>
pub fn get_immediate_context( d3d_device: &ID3D11Device, ) -> Result<ID3D11DeviceContext>
pub fn to_direct3d_surface( texture: &ID3D11Texture2D, ) -> Result<IDirect3DSurface>
pub fn from_direct3d_surface( surface: &IDirect3DSurface, ) -> Result<ID3D11Texture2D>
pub fn get_desc_from_texture(texture: &ID3D11Texture2D) -> D3D11_TEXTURE2D_DESC
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 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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more