pub struct ImportedTexture {
pub texture: Texture,
pub format: TextureFormat,
pub size: PhysicalSize<u32>,
pub origin: TextureOrigin,
pub generation: u64,
pub consumer_sync: SyncMechanism,
}Expand description
A successfully imported wgpu texture, ready for use in a render pipeline.
Returned by TextureImporter::import_frame.
Fields§
§texture: TextureThe imported wgpu texture. Bind this as a texture resource in your render pipeline.
format: TextureFormatThe pixel format of texture. Rgba8Unorm when
ImportOptions::normalize_format is true (the default).
size: PhysicalSize<u32>Dimensions of texture in physical pixels.
origin: TextureOriginWhether row 0 of texture is the top or bottom of the image.
TextureOrigin::TopLeft when ImportOptions::normalize_origin
is true (the default).
generation: u64Monotonically increasing counter that the producer increments each time new content is rendered. Use this to skip redundant re-imports.
consumer_sync: SyncMechanismThe synchronization mechanism the consumer should use after reading
texture. Passed to InteropSynchronizer::consumer_ready.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ImportedTexture
impl !RefUnwindSafe for ImportedTexture
impl Send for ImportedTexture
impl Sync for ImportedTexture
impl Unpin for ImportedTexture
impl UnsafeUnpin for ImportedTexture
impl !UnwindSafe for ImportedTexture
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