#[repr(C)]pub struct UnifiedInstance2D {Show 13 fields
pub position: [f32; 2],
pub size: [f32; 2],
pub uv_min: [f32; 2],
pub uv_max: [f32; 2],
pub color: [f32; 4],
pub border_radius: f32,
pub border_thickness: f32,
pub texture_index: u32,
pub draw_type: u32,
pub clip_min: [f32; 2],
pub clip_max: [f32; 2],
pub z_depth: f32,
pub _reserved: [f32; 3],
}Expand description
Unified instance data shared by all three render tiers.
96 bytes total, 16-byte aligned. Encodes quads, text glyphs, and images
as textured/untextured quads differentiated by draw_type.
Fields§
§position: [f32; 2]Screen-space position (top-left corner).
size: [f32; 2]Quad size in pixels.
uv_min: [f32; 2]Texture UV min (0,0 for solid quads).
uv_max: [f32; 2]Texture UV max (0,0 for solid quads).
color: [f32; 4]Fill/tint/text color (RGBA, premultiplied alpha).
border_radius: f32SDF corner radius in pixels.
border_thickness: f32Border outline thickness (0 = filled).
texture_index: u32Index into the texture array (0 for text atlas, 1..N for images).
draw_type: u32Draw type discriminant: 0=quad, 1=text, 2=image.
clip_min: [f32; 2]Shader-based clip rect min (screen space).
clip_max: [f32; 2]Shader-based clip rect max (screen space).
z_depth: f32Normalized depth (0.0=far, 1.0=near). Higher z_index maps to higher z_depth.
_reserved: [f32; 3]Reserved for future use (rotation, flags, custom_data).
Implementations§
Trait Implementations§
Source§impl Clone for UnifiedInstance2D
impl Clone for UnifiedInstance2D
Source§fn clone(&self) -> UnifiedInstance2D
fn clone(&self) -> UnifiedInstance2D
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for UnifiedInstance2D
impl Debug for UnifiedInstance2D
Source§impl Default for UnifiedInstance2D
impl Default for UnifiedInstance2D
impl Copy for UnifiedInstance2D
impl Pod for UnifiedInstance2D
Auto Trait Implementations§
impl Freeze for UnifiedInstance2D
impl RefUnwindSafe for UnifiedInstance2D
impl Send for UnifiedInstance2D
impl Sync for UnifiedInstance2D
impl Unpin for UnifiedInstance2D
impl UnsafeUnpin for UnifiedInstance2D
impl UnwindSafe for UnifiedInstance2D
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
Source§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
Source§type Bits = T
type Bits = T
Self must have the same layout as the specified Bits except for
the possible invalid bit patterns being checked during
is_valid_bit_pattern.Source§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more