mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 03:29:19 +02:00
really unbind vao
This commit is contained in:
@@ -16,6 +16,7 @@ gl::vao::~vao()
|
|||||||
if (!use_vao)
|
if (!use_vao)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
unbind();
|
||||||
glDeleteVertexArrays(1, *this);
|
glDeleteVertexArrays(1, *this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,4 +75,11 @@ void gl::vao::bind()
|
|||||||
void gl::vao::unbind()
|
void gl::vao::unbind()
|
||||||
{
|
{
|
||||||
active = nullptr;
|
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