pub struct VideoTexture {
pub texture: Texture2D,
pub frame_index: u64,
pub dirty: bool,
}Expand description
Mutable CPU-side texture updated frame by frame.
Fields§
§texture: Texture2DCurrent texture frame.
frame_index: u64Number of successfully uploaded frames.
dirty: boolWhether the texture has changed since the last upload.
Implementations§
Source§impl VideoTexture
impl VideoTexture
Sourcepub fn update_frame(&mut self, data: &[u8]) -> Result<(), ValidationError>
pub fn update_frame(&mut self, data: &[u8]) -> Result<(), ValidationError>
Replaces the current frame and marks the texture dirty.
Sourcepub fn mark_clean(&mut self)
pub fn mark_clean(&mut self)
Clears the dirty flag.
Trait Implementations§
Source§impl Clone for VideoTexture
impl Clone for VideoTexture
Source§fn clone(&self) -> VideoTexture
fn clone(&self) -> VideoTexture
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for VideoTexture
impl Debug for VideoTexture
Source§impl PartialEq for VideoTexture
impl PartialEq for VideoTexture
Source§fn eq(&self, other: &VideoTexture) -> bool
fn eq(&self, other: &VideoTexture) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for VideoTexture
Auto Trait Implementations§
impl Freeze for VideoTexture
impl RefUnwindSafe for VideoTexture
impl Send for VideoTexture
impl Sync for VideoTexture
impl Unpin for VideoTexture
impl UnsafeUnpin for VideoTexture
impl UnwindSafe for VideoTexture
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