pub struct SdfGlyphBatch {
pub key: BatchKey,
pub base_instances: Vec<GlyphInstance>,
pub sdf_extras: Vec<SdfInstanceExtra>,
}Expand description
A batch of SDF glyph instances ready for rendering.
Fields§
§key: BatchKey§base_instances: Vec<GlyphInstance>§sdf_extras: Vec<SdfInstanceExtra>Implementations§
Source§impl SdfGlyphBatch
impl SdfGlyphBatch
pub fn new(key: BatchKey) -> Self
pub fn clear(&mut self)
pub fn push(&mut self, base: GlyphInstance, extra: SdfInstanceExtra)
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
Sourcepub fn base_bytes(&self) -> &[u8] ⓘ
pub fn base_bytes(&self) -> &[u8] ⓘ
Raw byte slice of base instances for GPU upload.
Sourcepub fn extra_bytes(&self) -> &[u8] ⓘ
pub fn extra_bytes(&self) -> &[u8] ⓘ
Raw byte slice of SDF extras for GPU upload.
Sourcepub fn sort_back_to_front(&mut self)
pub fn sort_back_to_front(&mut self)
Sort instances back-to-front by Z.
Auto Trait Implementations§
impl Freeze for SdfGlyphBatch
impl RefUnwindSafe for SdfGlyphBatch
impl Send for SdfGlyphBatch
impl Sync for SdfGlyphBatch
impl Unpin for SdfGlyphBatch
impl UnsafeUnpin for SdfGlyphBatch
impl UnwindSafe for SdfGlyphBatch
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&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
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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> ⓘ
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