Closed JakeCallery closed 3 years ago
I'm Sorry, I think I figured it out.
pub struct App<'a> {
window: PistonWindow<Sdl2Window>,
ids: Ids,
ui: conrod_core::Ui,
image_map: conrod_core::image::Map<G2dTexture>,
text_texture_cache: G2dTexture,
glyph_cache: text::GlyphCache<'a>,
text_vertex_data: Vec<u8>,
pw_texture_context: G2dTextureContext,
}
Hi All, I am trying to organize a bunch of the boiler plate stuff in my code. I would like to save the glyph_cache and text_texture_cache into a struct:
In the examples glyph_cache and text_texture_cache are being defined as such:
So for glyph_cache, build() seems to return:
Cache<'font>
and for text_texture_cache it seems to return:
Texture<R> where R: gfx::Resources
Any chance someone could help me to figure out how to declare variables for those in a struct?
Thank you!