From 8a62f8c8737d59df11a9627fc031248ddbf3fe6c Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 11 Aug 2026 12:34:54 +0200 Subject: feat(opengl-bindings): add fn to disable a vertex array attribute --- opengl-bindings/Cargo.toml | 1 + opengl-bindings/src/vertex_array.rs | 14 ++++++++++++++ 2 files changed, 15 insertions(+) (limited to 'opengl-bindings') diff --git a/opengl-bindings/Cargo.toml b/opengl-bindings/Cargo.toml index cabbf90..081dd92 100644 --- a/opengl-bindings/Cargo.toml +++ b/opengl-bindings/Cargo.toml @@ -26,6 +26,7 @@ gl_commands = [ "VertexArrayElementBuffer", "VertexArrayVertexBuffer", "EnableVertexArrayAttrib", + "DisableVertexArrayAttrib", "VertexArrayAttribFormat", "VertexArrayAttribBinding", "BindVertexArray", diff --git a/opengl-bindings/src/vertex_array.rs b/opengl-bindings/src/vertex_array.rs index 91e62c5..84fdc42 100644 --- a/opengl-bindings/src/vertex_array.rs +++ b/opengl-bindings/src/vertex_array.rs @@ -177,6 +177,20 @@ impl VertexArray } } + pub fn disable_attrib( + &self, + current_context: &MaybeCurrentContextWithFns, + attrib_index: u32, + ) + { + unsafe { + current_context.fns().DisableVertexArrayAttrib( + self.array, + attrib_index as crate::sys::types::GLuint, + ); + } + } + pub fn set_attrib_format( &self, current_context: &MaybeCurrentContextWithFns, -- cgit v1.2.3-18-g5258