C++ - Do I Need To Call glEnableVertexAttribArray If I Use VAOs - Stack Overflow
C++ - Do I Need To Call glEnableVertexAttribArray If I Use VAOs - Stack Overflow
Asked 6 years, 11 months ago Modified 6 years, 11 months ago Viewed 270 times
I understood that VAOs can store bindings to VBOs and index VBOs (both GL_ARRAY_BUFFER and
GL_ELEMENT_ARRAY_BUFFER ), but now I have a question:
-1
void render()
{
..Set up textures, uniforms..
.. cleanup..
}
Do I still need to call glEnableVertexAttribArray even if I already bound a VAO properly set up?
See this answer, it should sort the things out for you. – Yakov Galka May 5, 2017 at 16:02
This is not necessary. You should have already called glEnableVertexAttribArray during the VAO
setup so they get enabled automatically when the VAO gets bound.
2
Share Improve this answer Follow answered May 5, 2017 at 13:06
BDL
21.7k 27 53 59