# Do I have to use vertexArray in opengl

GLuint VertexArrayID;
glGenVertexArrays(1, &VertexArrayID);
glBindVertexArray(VertexArrayID);


As you can see from the above code, some tutorials use this before using opengl. But a tutorial that I am following, directly uses glGenBuffers method and it works just fine. Hence I am totally confused what glGenVertexArrays. It is sad that it defines how buffer is used, but noone says in what way. Can you help me understand ?

• VAOs and VBOs (glGenBuffers) are two different things. You might benefit from reading an answer I wrote on StackOverflow. Dec 5 '14 at 10:46