diff options
| author | HampusM <hampus@hampusmat.com> | 2025-11-07 13:55:43 +0100 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2025-11-07 13:55:43 +0100 |
| commit | c85039da1d8c65cad4cd661b08e4acba706e32ee (patch) | |
| tree | ed287ac1ac420b444ba4858aa672ad3f819175a1 /opengl-bindings/src | |
| parent | 262092066834f0bf4848f0cd8a3bc6c851118881 (diff) | |
feat(opengl-bindings): add Texture into_raw & from_raw fns
Diffstat (limited to 'opengl-bindings/src')
| -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<'_>, |
