pub struct TextureKey {
pub width: u32,
pub height: u32,
pub format: TextureFormat,
pub usage: TextureUsages,
}Expand description
Allocation key: textures are interchangeable iff size, format, and usage all match.
Fields§
§width: u32§height: u32§format: TextureFormat§usage: TextureUsagesImplementations§
Source§impl TextureKey
impl TextureKey
Sourcepub fn offscreen(width: u32, height: u32, format: TextureFormat) -> Self
pub fn offscreen(width: u32, height: u32, format: TextureFormat) -> Self
The canonical post-process offscreen shape: render into
it in one pass, sample it in the next
(RENDER_ATTACHMENT | TEXTURE_BINDING). Zero dimensions
are clamped to 1 — same guard mado’s ensure_offscreen
carried for minimized windows.
Trait Implementations§
Source§impl Clone for TextureKey
impl Clone for TextureKey
Source§fn clone(&self) -> TextureKey
fn clone(&self) -> TextureKey
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 moreimpl Copy for TextureKey
Source§impl Debug for TextureKey
impl Debug for TextureKey
impl Eq for TextureKey
Source§impl Hash for TextureKey
impl Hash for TextureKey
Source§impl PartialEq for TextureKey
impl PartialEq for TextureKey
Source§fn eq(&self, other: &TextureKey) -> bool
fn eq(&self, other: &TextureKey) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TextureKey
Auto Trait Implementations§
impl Freeze for TextureKey
impl RefUnwindSafe for TextureKey
impl Send for TextureKey
impl Sync for TextureKey
impl Unpin for TextureKey
impl UnsafeUnpin for TextureKey
impl UnwindSafe for TextureKey
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.