Trait TextureMap

Source
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.

Required Methods§

Source

fn register(&mut self, gl_texture: GlTexture) -> Option<TextureId>

Source

fn gl_texture(&self, imgui_texture: TextureId) -> Option<GlTexture>

Implementations on Foreign Types§

Source§

impl TextureMap for Textures<Texture>

Textures is a simple choice for a texture map.

Source§

fn register(&mut self, gl_texture: Texture) -> Option<TextureId>

Source§

fn gl_texture(&self, imgui_texture: TextureId) -> Option<Texture>

Implementors§