From c85039da1d8c65cad4cd661b08e4acba706e32ee Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 7 Nov 2025 13:55:43 +0100 Subject: feat(opengl-bindings): add Texture into_raw & from_raw fns --- opengl-bindings/src/texture.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'opengl-bindings') 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<'_>, -- cgit v1.2.3-18-g5258