diff options
| author | HampusM <hampus@hampusmat.com> | 2026-08-11 12:34:54 +0200 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-08-11 12:34:54 +0200 |
| commit | 8a62f8c8737d59df11a9627fc031248ddbf3fe6c (patch) | |
| tree | 143fcc0a7b5b258a7bc6224b879fdea3a4489b29 /opengl-bindings | |
| parent | 4860c458078f714df46e683944735645f9d73618 (diff) | |
feat(opengl-bindings): add fn to disable a vertex array attribute
Diffstat (limited to 'opengl-bindings')
| -rw-r--r-- | opengl-bindings/Cargo.toml | 1 | ||||
| -rw-r--r-- | opengl-bindings/src/vertex_array.rs | 14 |
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, |
