pub struct UiLayerRenderer { /* private fields */ }Expand description
Renderer for the screen-space UI layer.
Holds CPU-side instance buffers and converts UiDrawCommands into
GlyphInstances positioned in screen-pixel coordinates.
Implementations§
Source§impl UiLayerRenderer
impl UiLayerRenderer
pub fn new() -> Self
Sourcepub fn build_instances(&mut self, ui: &UiLayer, atlas: &FontAtlas)
pub fn build_instances(&mut self, ui: &UiLayer, atlas: &FontAtlas)
Process all draw commands from the UI layer and build instance buffers.
Sourcepub fn glyph_instances(&self) -> &[GlyphInstance]
pub fn glyph_instances(&self) -> &[GlyphInstance]
Get the glyph instances for GPU upload.
Sourcepub fn glyph_bytes(&self) -> &[u8] ⓘ
pub fn glyph_bytes(&self) -> &[u8] ⓘ
Get glyph instance data as raw bytes for GPU upload.
Sourcepub fn rect_instances(&self) -> &[RectInstance]
pub fn rect_instances(&self) -> &[RectInstance]
Get rect instances for GPU upload.
Sourcepub fn rect_bytes(&self) -> &[u8] ⓘ
pub fn rect_bytes(&self) -> &[u8] ⓘ
Get rect instance data as raw bytes.
Sourcepub fn glyph_count(&self) -> usize
pub fn glyph_count(&self) -> usize
Total glyph count.
Sourcepub fn rect_count(&self) -> usize
pub fn rect_count(&self) -> usize
Total rect count.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UiLayerRenderer
impl RefUnwindSafe for UiLayerRenderer
impl Send for UiLayerRenderer
impl Sync for UiLayerRenderer
impl Unpin for UiLayerRenderer
impl UnsafeUnpin for UiLayerRenderer
impl UnwindSafe for UiLayerRenderer
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
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.