summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-03-20 14:06:53 +0100
committerHampusM <hampus@hampusmat.com>2026-03-20 14:06:53 +0100
commit0546d575c11d3668d0f95933697ae4f670fe2a55 (patch)
treed7986bd6e26629ac36d03aa98fae13c5e0d698d6
parent3f77642c378008bca3fc8eb8d692365ec371fa34 (diff)
feat(opengl-bindings): add shader::Program from_raw & into_raw fns
-rw-r--r--opengl-bindings/src/shader.rs10
1 files changed, 10 insertions, 0 deletions
diff --git a/opengl-bindings/src/shader.rs b/opengl-bindings/src/shader.rs
index d3ce530..2808f0f 100644
--- a/opengl-bindings/src/shader.rs
+++ b/opengl-bindings/src/shader.rs
@@ -215,6 +215,16 @@ impl Program
var.set(current_context, self, location);
}
+ pub fn from_raw(raw: u32) -> Self
+ {
+ Self { program: raw }
+ }
+
+ pub fn into_raw(self) -> u32
+ {
+ self.program
+ }
+
pub fn delete(self, current_context: &CurrentContextWithFns<'_>)
{
unsafe {