Struct obs_wrapper::graphics::GraphicsTexture
source · [−]pub struct GraphicsTexture { /* private fields */ }Expand description
Wrapper around gs_texture_t
Implementations
sourceimpl GraphicsTexture
impl GraphicsTexture
pub fn new(width: u32, height: u32, format: GraphicsColorFormat) -> Self
pub fn height(&self) -> u32
pub fn width(&self) -> u32
pub fn set_image(&mut self, data: &[u8], linesize: u32, invert: bool)
pub fn draw(&self, x: c_int, y: c_int, cx: u32, cy: u32, flip: bool)
pub fn map(&mut self) -> Result<MappedTexture<'_>>
pub unsafe fn as_ptr(&self) -> *mut gs_texture_t
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for GraphicsTexture
impl !Send for GraphicsTexture
impl !Sync for GraphicsTexture
impl Unpin for GraphicsTexture
impl UnwindSafe for GraphicsTexture
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more