summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2026-08-11 12:34:54 +0200
committerHampusM <hampus@hampusmat.com>2026-08-11 12:34:54 +0200
commit8a62f8c8737d59df11a9627fc031248ddbf3fe6c (patch)
tree143fcc0a7b5b258a7bc6224b879fdea3a4489b29
parent4860c458078f714df46e683944735645f9d73618 (diff)
feat(opengl-bindings): add fn to disable a vertex array attribute
-rw-r--r--opengl-bindings/Cargo.toml1
-rw-r--r--opengl-bindings/src/vertex_array.rs14
2 files changed, 15 insertions, 0 deletions
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,