mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
really unbind vao
This commit is contained in:
@@ -16,6 +16,7 @@ gl::vao::~vao()
|
||||
if (!use_vao)
|
||||
return;
|
||||
|
||||
unbind();
|
||||
glDeleteVertexArrays(1, *this);
|
||||
}
|
||||
|
||||
@@ -74,4 +75,11 @@ void gl::vao::bind()
|
||||
void gl::vao::unbind()
|
||||
{
|
||||
active = nullptr;
|
||||
if (use_vao) {
|
||||
glBindVertexArray(0);
|
||||
}
|
||||
else {
|
||||
for (size_t i = 0; i < 4; i++)
|
||||
glDisableVertexAttribArray(i);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user