pub struct TexturedPacketMaterial {
pub tex_window_word: u32,
pub color_command_word: u32,
pub clut_high_word: u32,
pub tpage_high_word: u32,
}Expand description
Prepacked material words for flat textured triangle packets.
Animated model render paths can emit hundreds of textured triangles with one resolved atlas material. Keeping the invariant GP0 words together avoids rebuilding texture-window, command, CLUT, and tpage state for every face.
Fields§
§tex_window_word: u32GP0(E2) texture-window word.
color_command_word: u32Flat textured triangle command word.
clut_high_word: u32CLUT word shifted into the high half of vertex-0 UV.
tpage_high_word: u32TexturePage word shifted into the high half of vertex-1 UV.
Implementations§
Source§impl TexturedPacketMaterial
impl TexturedPacketMaterial
Sourcepub const fn from_texture(material: TextureMaterial) -> Self
pub const fn from_texture(material: TextureMaterial) -> Self
Build prepacked packet words from a texture material.
Sourcepub const fn is_translucent(self) -> bool
pub const fn is_translucent(self) -> bool
True when packets using this material need the transparent render layer.
Sourcepub const fn with_clut_bank(self, bank: u8) -> Self
pub const fn with_clut_bank(self, bank: u8) -> Self
Return packet words selecting a consecutive 16-entry 4bpp CLUT bank.
Trait Implementations§
Source§impl Clone for TexturedPacketMaterial
impl Clone for TexturedPacketMaterial
Source§fn clone(&self) -> TexturedPacketMaterial
fn clone(&self) -> TexturedPacketMaterial
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TexturedPacketMaterial
impl Debug for TexturedPacketMaterial
Source§impl PartialEq for TexturedPacketMaterial
impl PartialEq for TexturedPacketMaterial
impl Copy for TexturedPacketMaterial
impl Eq for TexturedPacketMaterial
impl StructuralPartialEq for TexturedPacketMaterial
Auto Trait Implementations§
impl Freeze for TexturedPacketMaterial
impl RefUnwindSafe for TexturedPacketMaterial
impl Send for TexturedPacketMaterial
impl Sync for TexturedPacketMaterial
impl Unpin for TexturedPacketMaterial
impl UnsafeUnpin for TexturedPacketMaterial
impl UnwindSafe for TexturedPacketMaterial
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)