pub struct TextureSlot {
pub pool_name: Option<String>,
pub texsize: [f32; 4],
}Expand description
One slot in a TextureBindingPlan. Carries the resolved pool
texture name (or None when the renderer should fall back to the
1×1 white fallback) and the texture’s vec4<f32>(w, h, 1/w, 1/h)
for the texsize_<NAME> constant the wrapper emits.
Fields§
§pool_name: Option<String>Logical pool name (lowercase filename stem) that the renderer
must bind into this slot. None → no texture available; bind
the fallback. Stable across reloads as long as the pool’s disk
layout doesn’t change.
texsize: [f32; 4]MD2 texsize_<NAME> constant for the texture that’s bound.
Emitted inline by the wrapper so user shader code can read the
dimensions without going through a uniform. [1.0; 4] for the
fallback case.
Trait Implementations§
Source§impl Clone for TextureSlot
impl Clone for TextureSlot
Source§fn clone(&self) -> TextureSlot
fn clone(&self) -> TextureSlot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TextureSlot
impl Debug for TextureSlot
Source§impl PartialEq for TextureSlot
impl PartialEq for TextureSlot
impl StructuralPartialEq for TextureSlot
Auto Trait Implementations§
impl Freeze for TextureSlot
impl RefUnwindSafe for TextureSlot
impl Send for TextureSlot
impl Sync for TextureSlot
impl Unpin for TextureSlot
impl UnwindSafe for TextureSlot
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