gles2: expose texture id

This commit is contained in:
Victor Brekenfeld 2021-07-25 01:51:44 +02:00 committed by Victor Berger
parent 3e4d93dfff
commit 3cc89dcf6e
1 changed files with 7 additions and 0 deletions

View File

@ -93,6 +93,13 @@ impl Gles2Texture {
destruction_callback_sender: renderer.destruction_callback_sender.clone(), destruction_callback_sender: renderer.destruction_callback_sender.clone(),
})) }))
} }
/// OpenGL texture id of this texture
///
/// This id will become invalid, when the Gles2Texture is dropped and does not transfer ownership.
pub fn tex_id(&self) -> ffi::types::GLuint {
self.0.texture
}
} }
#[derive(Debug)] #[derive(Debug)]