pub struct TexturedGouraudPacketMaterial {
pub tex_window_word: u32,
pub color0_command_word: u32,
pub clut_high_word: u32,
pub tpage_high_word: u32,
}Expand description
Prepacked material words for textured Gouraud triangle packets.
Hot cached-room paths emit many triangles with the same material. Keeping these invariant words beside the resolved material avoids rebuilding GP0 texture-window, command, CLUT, and tpage state for every primitive packet.
Fields§
§tex_window_word: u32GP0(E2) texture-window word.
color0_command_word: u32Textured Gouraud triangle command word without vertex-0 RGB.
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 TexturedGouraudPacketMaterial
impl TexturedGouraudPacketMaterial
Sourcepub const fn from_texture(material: TextureMaterial) -> Self
pub const fn from_texture(material: TextureMaterial) -> Self
Build prepacked Gouraud 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.
Trait Implementations§
Source§impl Clone for TexturedGouraudPacketMaterial
impl Clone for TexturedGouraudPacketMaterial
Source§fn clone(&self) -> TexturedGouraudPacketMaterial
fn clone(&self) -> TexturedGouraudPacketMaterial
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 TexturedGouraudPacketMaterial
impl Debug for TexturedGouraudPacketMaterial
Source§impl PartialEq for TexturedGouraudPacketMaterial
impl PartialEq for TexturedGouraudPacketMaterial
impl Copy for TexturedGouraudPacketMaterial
impl Eq for TexturedGouraudPacketMaterial
impl StructuralPartialEq for TexturedGouraudPacketMaterial
Auto Trait Implementations§
impl Freeze for TexturedGouraudPacketMaterial
impl RefUnwindSafe for TexturedGouraudPacketMaterial
impl Send for TexturedGouraudPacketMaterial
impl Sync for TexturedGouraudPacketMaterial
impl Unpin for TexturedGouraudPacketMaterial
impl UnsafeUnpin for TexturedGouraudPacketMaterial
impl UnwindSafe for TexturedGouraudPacketMaterial
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)