summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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,