[−][src]Struct vulkano_glyph::GpuCache
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]
&mut self,
queue: &Arc<Queue>,
glyphs: I
) -> Result<Option<CommandBufferExecFuture<NowFuture, AutoCommandBuffer>>> where
I: IntoIterator<Item = (FontId, PositionedGlyph<'font>)>,
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]
&self,
font_id: FontId,
glyph: &PositionedGlyph
) -> Result<Option<TextureCoords>, CacheReadErr>
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
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,