pub struct Texture {
pub texture: Texture,
pub view: TextureView,
pub sampler: Sampler,
}Expand description
An abstraction for a texture.
Fields§
§texture: Texture§view: TextureView§sampler: SamplerImplementations§
Source§impl Texture
impl Texture
pub const DEPTH_FORMAT: TextureFormat = wgpu::TextureFormat::Depth32Float
pub fn from_bytes( label: &str, device: &Device, queue: &Queue, bytes: &[u8], ) -> Result<Self>
pub fn from_image( label: &str, device: &Device, queue: &Queue, img: &DynamicImage, ) -> Result<Self>
pub fn create_depth_texture( label: &str, device: &Device, config: &SurfaceConfiguration, ) -> Self
Auto Trait Implementations§
impl Freeze for Texture
impl !RefUnwindSafe for Texture
impl Send for Texture
impl Sync for Texture
impl Unpin for Texture
impl !UnwindSafe for Texture
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