#[repr(C)]pub struct BorderUniform {
pub extents: [f32; 4],
pub color: [f32; 4],
}Expand description
One ring’s per-draw uniform: outer + inner clip-space extents and
the ring’s RGBA colour. The vertex shader treats the extents as
(±outer_x, ±outer_y) for the outer quad corners and
(±inner_x, ±inner_y) for the inner quad corners; the four frame
strips (top/bottom/left/right) are built from those eight corners.
Fields§
§extents: [f32; 4][outer_x, outer_y, inner_x, inner_y] in clip space [0, 1].
We mirror to (±outer_x, ±outer_y) inside the shader.
color: [f32; 4][r, g, b, a]. Pre-multiplied isn’t needed — the pipeline uses
standard alpha blending.
Trait Implementations§
Source§impl Clone for BorderUniform
impl Clone for BorderUniform
Source§fn clone(&self) -> BorderUniform
fn clone(&self) -> BorderUniform
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BorderUniform
impl Debug for BorderUniform
Source§impl Default for BorderUniform
impl Default for BorderUniform
Source§impl PartialEq for BorderUniform
impl PartialEq for BorderUniform
impl Copy for BorderUniform
impl Pod for BorderUniform
impl StructuralPartialEq for BorderUniform
Auto Trait Implementations§
impl Freeze for BorderUniform
impl RefUnwindSafe for BorderUniform
impl Send for BorderUniform
impl Sync for BorderUniform
impl Unpin for BorderUniform
impl UnwindSafe for BorderUniform
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
Mutably borrows from an owned value. Read more
§impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
impl<T> CheckedBitPattern for Twhere
T: AnyBitPattern,
§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.§fn is_valid_bit_pattern(_bits: &T) -> bool
fn is_valid_bit_pattern(_bits: &T) -> bool
If this function returns true, then it must be valid to reinterpret
bits
as &Self.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().