diff options
Diffstat (limited to 'opengl-bindings')
| -rw-r--r-- | opengl-bindings/src/texture.rs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/opengl-bindings/src/texture.rs b/opengl-bindings/src/texture.rs index 1859beb..2683772 100644 --- a/opengl-bindings/src/texture.rs +++ b/opengl-bindings/src/texture.rs @@ -1,5 +1,5 @@ -use crate::data_types::Dimens; use crate::CurrentContextWithFns; +use crate::data_types::Dimens; #[derive(Debug)] pub struct Texture @@ -134,6 +134,16 @@ impl Texture } } + pub fn from_raw(raw: u32) -> Self + { + Self { texture: raw } + } + + pub fn into_raw(self) -> u32 + { + self.texture + } + fn alloc_image( &self, current_context: &CurrentContextWithFns<'_>, |
