pub struct TextureReader { /* private fields */ }
Expand description
Tool for reading GPU only directx textures.
§Example usage
use win_desktop_duplication::tex_reader::TextureReader;
let mut reader = TextureReader::new(device, context);
// using same vector will be so much efficient.
let mut data:Vec<u8> = Vec::new();
loop {
let tex = // some way to acquire texture like DesktopDuplicationApi;
reader.get_data(&mut data,&tex).unwrap();
// use image data here. send it to client etc whatever
}
Implementations§
Trait Implementations§
impl Send for TextureReader
impl Sync for TextureReader
Auto Trait Implementations§
impl Freeze for TextureReader
impl RefUnwindSafe for TextureReader
impl Unpin for TextureReader
impl UnwindSafe for TextureReader
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