pub struct SlugGlyphBuffer {
pub instances: Vec<GpuGlyphInstance>,
pub curves: Vec<GpuGlyphCurve>,
/* private fields */
}Expand description
VRAM-ready batch buffer packing analytical glyph instances and curves.
Fields§
§instances: Vec<GpuGlyphInstance>§curves: Vec<GpuGlyphCurve>Implementations§
Source§impl SlugGlyphBuffer
impl SlugGlyphBuffer
Sourcepub fn sync_barrier(&self) -> u64
pub fn sync_barrier(&self) -> u64
Advances and returns the hardware synchronization fence.
Sourcepub fn is_fence_synchronized(&self, fence: u64) -> bool
pub fn is_fence_synchronized(&self, fence: u64) -> bool
Verifies whether the hardware fence has been signaled.
Sourcepub fn push_glyph(
&mut self,
glyph: &AnalyticGlyph,
screen_bounds: Rect2D,
color: [f32; 4],
clip_rect: Rect2D,
) -> bool
pub fn push_glyph( &mut self, glyph: &AnalyticGlyph, screen_bounds: Rect2D, color: [f32; 4], clip_rect: Rect2D, ) -> bool
Appends an analytical glyph to the draw batch with buffer bounds validation.
Sourcepub fn instances_as_bytes(&self) -> &[u8] ⓘ
pub fn instances_as_bytes(&self) -> &[u8] ⓘ
Returns byte slice of instance buffer for direct GPU upload.
Sourcepub fn curves_as_bytes(&self) -> &[u8] ⓘ
pub fn curves_as_bytes(&self) -> &[u8] ⓘ
Returns byte slice of curve storage buffer for direct GPU upload.
Trait Implementations§
Source§impl Clone for SlugGlyphBuffer
impl Clone for SlugGlyphBuffer
Source§impl Debug for SlugGlyphBuffer
impl Debug for SlugGlyphBuffer
Auto Trait Implementations§
impl !Freeze for SlugGlyphBuffer
impl Forget for SlugGlyphBuffer
impl Move for SlugGlyphBuffer
impl RefUnwindSafe for SlugGlyphBuffer
impl Send for SlugGlyphBuffer
impl Sync for SlugGlyphBuffer
impl Unpin for SlugGlyphBuffer
impl UnsafeUnpin for SlugGlyphBuffer
impl UnwindSafe for SlugGlyphBuffer
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