0

I'm just making sure my knowledge on VAO and VBO is correct. It's been a long time since I've studied OpenGL and just wanted to make sure my knowledge was still correct.

A VAO is an object that contains attribute pointers and each attribute pointer has a index number (0, 1, 2), so then we can easily refer to which attribute pointer we want to use. Each attribute pointer points to different attribute data such as normals, texture coordinates, etc. Although the VAO contains information for the object, it doesn't actually contain the attribute info. The VBO stores the vertex attribute data. Then, the VBO is stored inside the VAO's attribute pointers. To access a VAO's attribute pointer data in the shader and get input, we must use layout (location = indexNumber) in myVariable;

Rabbid76
  • 177,135
  • 25
  • 101
  • 146
  • See [Vertex Specification](https://www.khronos.org/opengl/wiki/Vertex_Specification). Actually this isn't a Stack Overflow question, but you're looking for a tutorial. (e.g. [LearnOpenGL](https://learnopengl.com/Getting-started/Hello-Triangle)) – Rabbid76 Mar 13 '22 at 06:48

0 Answers0