#[repr(C, align(4))]pub struct TriFlat {
pub tag: u32,
pub color_cmd: u32,
pub v0: u32,
pub v1: u32,
pub v2: u32,
}Expand description
Flat-shaded triangle. 5 words (tag + 4 data).
Fields§
§tag: u32DMA / OT linkage word. Written by the OT at insert time.
color_cmd: u320x20000000 | rgb24 header.
v0: u32Vertex 0 packed via [pack_vertex].
v1: u32Vertex 1.
v2: u32Vertex 2.
Implementations§
Source§impl TriFlat
impl TriFlat
Sourcepub const fn new(verts: [(i16, i16); 3], r: u8, g: u8, b: u8) -> Self
pub const fn new(verts: [(i16, i16); 3], r: u8, g: u8, b: u8) -> Self
Build a flat triangle ready for OT insertion.
Sourcepub const fn translucent(self) -> Self
pub const fn translucent(self) -> Self
The same triangle drawn with the semi-transparency equation set by the
last GP0(E1h) (crate::Gpu::set_draw_mode).
Trait Implementations§
impl Copy for TriFlat
impl Eq for TriFlat
impl StructuralPartialEq for TriFlat
Auto Trait Implementations§
impl Freeze for TriFlat
impl RefUnwindSafe for TriFlat
impl Send for TriFlat
impl Sync for TriFlat
impl Unpin for TriFlat
impl UnsafeUnpin for TriFlat
impl UnwindSafe for TriFlat
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)