Struct webrender::renderer::vertex::VertexDataTexture
source · pub struct VertexDataTexture<T> {
texture: Option<Texture>,
format: ImageFormat,
_marker: PhantomData<T>,
}
Fields§
§texture: Option<Texture>
§format: ImageFormat
§_marker: PhantomData<T>
Implementations§
source§impl<T> VertexDataTexture<T>
impl<T> VertexDataTexture<T>
pub fn new(format: ImageFormat) -> Self
sourcepub fn texture(&self) -> &Texture
pub fn texture(&self) -> &Texture
Returns a borrow of the GPU texture. Panics if it hasn’t been initialized.
sourcepub fn size_in_bytes(&self) -> usize
pub fn size_in_bytes(&self) -> usize
Returns an estimate of the GPU memory consumed by this VertexDataTexture.
pub fn update<'a>( &'a mut self, device: &mut Device, texture_uploader: &mut TextureUploader<'a>, data: &mut Vec<T>, )
pub fn deinit(self, device: &mut Device)
Auto Trait Implementations§
impl<T> !Freeze for VertexDataTexture<T>
impl<T> !RefUnwindSafe for VertexDataTexture<T>
impl<T> Send for VertexDataTexture<T>where
T: Send,
impl<T> !Sync for VertexDataTexture<T>
impl<T> Unpin for VertexDataTexture<T>where
T: Unpin,
impl<T> UnwindSafe for VertexDataTexture<T>where
T: UnwindSafe,
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