Skip to content

Commit

Permalink
call glDisableVertexAttribArray when delete buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
birhburh authored and not-fl3 committed Feb 2, 2025
1 parent ce657cf commit 1802160
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/graphics/gl/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ impl GlCache {
pub fn clear_vertex_attributes(&mut self) {
for attr_index in 0..MAX_VERTEX_ATTRIBUTES {
let cached_attr = &mut self.attributes[attr_index];

if cached_attr.is_some() {
unsafe {
glDisableVertexAttribArray(attr_index as GLuint)
};
}
*cached_attr = None;
}
}
Expand Down

0 comments on commit 1802160

Please sign in to comment.