summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2025-11-07 13:55:43 +0100
committerHampusM <hampus@hampusmat.com>2025-11-07 13:55:43 +0100
commitc85039da1d8c65cad4cd661b08e4acba706e32ee (patch)
treeed287ac1ac420b444ba4858aa672ad3f819175a1
parent262092066834f0bf4848f0cd8a3bc6c851118881 (diff)
feat(opengl-bindings): add Texture into_raw & from_raw fns
-rw-r--r--opengl-bindings/src/texture.rs12
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<'_>,