pub trait Texture {
// Required methods
fn width(&self) -> u32;
fn height(&self) -> u32;
fn put_rect(&mut self, pixel: PixelType, data: &[u8], gpu: &TextureGlyph);
}Expand description
Any object that can take the data for glyphs and store it over time
Textures can be image buffers on the CPU (like ones provided by the image crate) or a buffer on the GPU, through any graphics library.
Required Methods§
fn width(&self) -> u32
fn height(&self) -> u32
Sourcefn put_rect(&mut self, pixel: PixelType, data: &[u8], gpu: &TextureGlyph)
fn put_rect(&mut self, pixel: PixelType, data: &[u8], gpu: &TextureGlyph)
Write the data from a font into a texture