diff options
| author | HampusM <hampus@hampusmat.com> | 2025-11-07 13:54:54 +0100 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2025-11-07 13:54:54 +0100 |
| commit | 262092066834f0bf4848f0cd8a3bc6c851118881 (patch) | |
| tree | b2d2019264c01e7eb2fb22908ad163bb67017c6c /opengl-bindings/src/vertex_array.rs | |
| parent | a523c4308703c41215c8688c1c9bf1eb3908ddac (diff) | |
feat(opengl-bindings): add Buffer & VertexArray delete fns
Diffstat (limited to 'opengl-bindings/src/vertex_array.rs')
| -rw-r--r-- | opengl-bindings/src/vertex_array.rs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/opengl-bindings/src/vertex_array.rs b/opengl-bindings/src/vertex_array.rs index 9942fe7..d3af604 100644 --- a/opengl-bindings/src/vertex_array.rs +++ b/opengl-bindings/src/vertex_array.rs @@ -3,8 +3,8 @@ use std::mem::size_of; use safer_ffi::layout::ReprC; -use crate::buffer::Buffer; use crate::CurrentContextWithFns; +use crate::buffer::Buffer; #[derive(Debug)] pub struct VertexArray @@ -188,6 +188,15 @@ impl VertexArray { unsafe { current_context.fns().BindVertexArray(self.array) } } + + pub fn delete(&self, current_context: &CurrentContextWithFns<'_>) + { + unsafe { + current_context + .fns() + .DeleteVertexArrays(1, &raw const self.array); + } + } } #[derive(Debug)] |
