#[repr(C, align(4))]pub struct QuadGouraud {
pub tag: u32,
pub color0_cmd: u32,
pub v0: u32,
pub color1: u32,
pub v1: u32,
pub color2: u32,
pub v2: u32,
pub color3: u32,
pub v3: u32,
}Expand description
Gouraud-shaded quad. 9 words (tag + 8 data).
Same vertex order as QuadFlat (V0=TL, V1=TR, V2=BL, V3=BR
by convention, though the GPU actually draws (V0,V1,V2) then
(V1,V2,V3)). Each vertex carries its own RGB; the GPU
gouraud-interpolates across the primitive.
Fields§
§tag: u32OT linkage.
color0_cmd: u32Vertex 0 colour + polygon opcode.
v0: u32Vertex 0 position.
color1: u32Vertex 1 colour.
v1: u32Vertex 1 position.
color2: u32Vertex 2 colour.
v2: u32Vertex 2 position.
color3: u32Vertex 3 colour.
v3: u32Vertex 3 position.
Implementations§
Source§impl QuadGouraud
impl QuadGouraud
Sourcepub const fn new(verts: [(i16, i16); 4], colors: [(u8, u8, u8); 4]) -> Self
pub const fn new(verts: [(i16, i16); 4], colors: [(u8, u8, u8); 4]) -> Self
Build a Gouraud quad. colors[i] corresponds to verts[i].
Sourcepub const fn translucent(self) -> Self
pub const fn translucent(self) -> Self
The same quad drawn with the semi-transparency equation set by the
last GP0(E1h) (crate::Gpu::set_draw_mode).
Trait Implementations§
Source§impl Clone for QuadGouraud
impl Clone for QuadGouraud
Source§fn clone(&self) -> QuadGouraud
fn clone(&self) -> QuadGouraud
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 QuadGouraud
impl Debug for QuadGouraud
Source§impl GpuPacket for QuadGouraud
impl GpuPacket for QuadGouraud
Source§impl Hash for QuadGouraud
impl Hash for QuadGouraud
Source§impl PartialEq for QuadGouraud
impl PartialEq for QuadGouraud
impl Copy for QuadGouraud
impl Eq for QuadGouraud
impl StructuralPartialEq for QuadGouraud
Auto Trait Implementations§
impl Freeze for QuadGouraud
impl RefUnwindSafe for QuadGouraud
impl Send for QuadGouraud
impl Sync for QuadGouraud
impl Unpin for QuadGouraud
impl UnsafeUnpin for QuadGouraud
impl UnwindSafe for QuadGouraud
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)