0

I have multiple VBOs and matching VAOs set up in my rendering engine. I am a bit confused about using glVertexAttribPointer. I have set it and it renders fine but I am curious if I am using one shader (a basic diffuse) with all of these different objects, do I set glVertexAttribPointer each time I create a VAO. I guess what's throwing me is I am trying to figure out if my setting an attribute pointer, is that set in the shader or the vertex array object. I assume it's the vertex array object but am hoping for some clarification.

genpfault
  • 51,148
  • 11
  • 85
  • 139
Satchmo Brown
  • 1,409
  • 2
  • 20
  • 47
  • [Read this.](http://www.opengl.org/wiki/Vertex_Specification) That should make the relations between buffer objects and VAOs clear. – Nicol Bolas Mar 30 '13 at 00:40

1 Answers1

2

Vertex attribute pointers are per vertex array object (VAO). The OpenGL 4.3 specification on page 318 in the description of glGetVertexAttribPointerv specifies: The value returned is queried from the currently bound vertex array object.

radical7
  • 8,957
  • 3
  • 24
  • 33