pub struct SimpleTextureMap { /* private fields */ }Expand description
Simple texture map implementation using a HashMap with modern texture management
Implementations§
Source§impl SimpleTextureMap
impl SimpleTextureMap
Sourcepub fn iter(&self) -> impl Iterator<Item = (&TextureId, &GlTexture)>
pub fn iter(&self) -> impl Iterator<Item = (&TextureId, &GlTexture)>
Iterate over all texture mappings
Sourcepub fn texture_data_iter(
&self,
) -> impl Iterator<Item = (&TextureId, &TextureData)>
pub fn texture_data_iter( &self, ) -> impl Iterator<Item = (&TextureId, &TextureData)>
Iterate over all texture data
Trait Implementations§
Source§impl Default for SimpleTextureMap
impl Default for SimpleTextureMap
Source§fn default() -> SimpleTextureMap
fn default() -> SimpleTextureMap
Returns the “default value” for a type. Read more
Source§impl TextureMap for SimpleTextureMap
impl TextureMap for SimpleTextureMap
Source§fn get(&self, texture_id: TextureId) -> Option<GlTexture>
fn get(&self, texture_id: TextureId) -> Option<GlTexture>
Get the OpenGL texture for a Dear ImGui texture ID
Source§fn set(&mut self, texture_id: TextureId, gl_texture: GlTexture)
fn set(&mut self, texture_id: TextureId, gl_texture: GlTexture)
Set the OpenGL texture for a Dear ImGui texture ID
Source§fn register_texture(
&mut self,
gl_texture: GlTexture,
width: i32,
height: i32,
format: TextureFormat,
) -> TextureId
fn register_texture( &mut self, gl_texture: GlTexture, width: i32, height: i32, format: TextureFormat, ) -> TextureId
Register a texture with Dear ImGui’s texture management system
Source§fn update_texture(
&mut self,
texture_id: TextureId,
gl_texture: GlTexture,
_width: i32,
_height: i32,
)
fn update_texture( &mut self, texture_id: TextureId, gl_texture: GlTexture, _width: i32, _height: i32, )
Update a texture in Dear ImGui’s texture management system
Source§fn get_texture_data(&self, texture_id: TextureId) -> Option<&TextureData>
fn get_texture_data(&self, texture_id: TextureId) -> Option<&TextureData>
Get texture data from Dear ImGui’s texture management system
Source§fn get_texture_data_mut(
&mut self,
texture_id: TextureId,
) -> Option<&mut TextureData>
fn get_texture_data_mut( &mut self, texture_id: TextureId, ) -> Option<&mut TextureData>
Get mutable texture data from Dear ImGui’s texture management system
Auto Trait Implementations§
impl Freeze for SimpleTextureMap
impl RefUnwindSafe for SimpleTextureMap
impl !Send for SimpleTextureMap
impl !Sync for SimpleTextureMap
impl Unpin for SimpleTextureMap
impl UnsafeUnpin for SimpleTextureMap
impl UnwindSafe for SimpleTextureMap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more