pub trait TextureMap {
// Required methods
fn register(&mut self, gl_texture: GlTexture) -> Option<TextureId>;
fn gl_texture(&self, imgui_texture: TextureId) -> Option<GlTexture>;
}
Expand description
Trait for mapping imgui texture IDs to OpenGL textures.
register
should be called after uploading a texture to OpenGL to get a
TextureId
corresponding to it.
Then gl_texture
can be called to find the OpenGL texture corresponding to
that TextureId
.