Skip to content

Commit

Permalink
clear current descriptor set when changing a uniform buffer binding
Browse files Browse the repository at this point in the history
  • Loading branch information
szabolcsdombi committed Dec 2, 2024
1 parent 5694f20 commit 28e36e5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions zengl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1830,6 +1830,9 @@ static Buffer * Context_meth_buffer(Context * self, PyObject * args, PyObject *
if (target == GL_ELEMENT_ARRAY_BUFFER) {
bind_vertex_array(self, 0);
}
if (target == GL_UNIFORM_BUFFER) {
self->current_descriptor_set = NULL;
}
glGenBuffers(1, &buffer);
glBindBuffer(target, buffer);
glBufferData(target, size, NULL, access);
Expand Down

0 comments on commit 28e36e5

Please sign in to comment.