mirror of
https://github.com/eliasstepanik/imgui-rs.git
synced 2026-01-15 23:48:31 +00:00
added new for texture id
This commit is contained in:
parent
767e8058fb
commit
6e54cb39d4
@ -6,6 +6,12 @@ use std::collections::HashMap;
|
||||
pub struct TextureId(usize);
|
||||
|
||||
impl TextureId {
|
||||
/// Creates a new texture id with the given identifier.
|
||||
pub fn new(id: usize) -> Self {
|
||||
Self(id)
|
||||
}
|
||||
|
||||
/// Returns the id of the TextureId.
|
||||
pub fn id(self) -> usize {
|
||||
self.0
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user