[][src]Struct vulkano_glyph::GpuCache

pub struct GpuCache<'font> { /* fields omitted */ }

Wraps rusttype's cache for use with vulkano.

Methods

impl<'font> GpuCache<'font>[src]

pub fn new<'a>(device: &Arc<Device>) -> Result<Self>[src]

Create a new GpuCache for use on the given device.

pub fn cache<I>(
    &mut self,
    queue: &Arc<Queue>,
    glyphs: I
) -> Result<Option<CommandBufferExecFuture<NowFuture, AutoCommandBuffer>>> where
    I: IntoIterator<Item = (FontId, PositionedGlyph<'font>)>, 
[src]

Overwrite the cache with a new collection of glyphs. If the cache is too small, it will be resized until it is big enough.

pub fn rect_for(
    &self,
    font_id: FontId,
    glyph: &PositionedGlyph
) -> Result<Option<TextureCoords>, CacheReadErr>
[src]

Get the coordinates of a glyph on the image.

pub fn image(&self) -> &Arc<StorageImage<R8Unorm>>[src]

The GPU image containing cached glyphs.

Auto Trait Implementations

impl<'font> Send for GpuCache<'font>

impl<'font> Sync for GpuCache<'font>

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Content for T[src]

impl<T> Erased for T