1

This small piece of code makes me confused.

GLuint VAO;

glGenVertexArrays(1, &VAO);
glBindVertexArray(VAO);

From what I know, glGenVertexArrays generates 1 name/ID and stores it into the variable VAO. What I don't understand is when I use the function glBindVertexArray. When it binds, it binds the name/ID with the VAO object. Where is the VAO object? The only item passed into glBindVertexArray is the VAO integer object but I thought that the VAO integer object only stores the name/ID of the VAO. I don't think that the VAO integer object is the actual VAO object itself. If it isn't so, where is the VAO object that it will bind the name/ID to?

genpfault
  • 51,148
  • 11
  • 85
  • 139

0 Answers0