pub struct Texture<D> { /* private fields */ }Expand description
A texture type. Can contain either owned or borrowed pixel data.
Textures are used to render texture mapped geometry, by interpolating
texture coordinates across polygon faces. To read, or sample, from a
Texture, use one of the Sampler* types defined in this module.
Multiple textures can be packed into a single larger memory buffer, often called a “texture atlas” or “sprite sheet”. Each texture borrows a region of the larger buffer.
- TODO Mipmapping
- TODO Bilinear filtering sampler
Implementations§
Trait Implementations§
impl<D: Copy> Copy for Texture<D>
Auto Trait Implementations§
impl<D> Freeze for Texture<D>where
D: Freeze,
impl<D> RefUnwindSafe for Texture<D>where
D: RefUnwindSafe,
impl<D> Send for Texture<D>where
D: Send,
impl<D> Sync for Texture<D>where
D: Sync,
impl<D> Unpin for Texture<D>where
D: Unpin,
impl<D> UnwindSafe for Texture<D>where
D: 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