Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualLaval B

Posted 09 June 2013 - 02:05 PM

Thank you for the clear answer smile.png

 

It makes sense indeed, i didn't pay attention when i read the glVertexAttribPointer/glEnableVertexAttribArray part and got confused when they say :

 

<array> is the vertex array object name. The resulting vertex array

object is a new state vector, comprising all the state values listed in
tables 6.6 (except for the CLIENT_ACTIVE_TEXTURE selector state), 6.7,
and 6.8 (except for the ARRAY_BUFFER_BINDING state).

 

Ref http://www.opengl.org/registry/specs/ARB/vertex_array_object.txt

 

I forgot that vertex attributes are not necessarily in the same vbo (over 95 % of my vbo are filled with interleaved data).

 

Now, index buffer will get bound when binding the VAO. I guess i can still bind the index buffer separately after binding the VAO (which will update the VAO state every time though). If i do this, i will have to make sure to bind index buffer 0 if I render a VAO with no index buffer. Would that be a problem ? You see, my code base pretty much separates the vertex (and the vertext attribute specification) from the index.


#1Laval B

Posted 08 June 2013 - 09:11 AM

Thank you the clear answer smile.png

 

It makes sense indeed, i didn't pay attention when i read the glVertexAttribPointer/glEnableVertexAttribArray part and got confused when they say :

 

<array> is the vertex array object name. The resulting vertex array

object is a new state vector, comprising all the state values listed in
tables 6.6 (except for the CLIENT_ACTIVE_TEXTURE selector state), 6.7,
and 6.8 (except for the ARRAY_BUFFER_BINDING state).

 

Ref http://www.opengl.org/registry/specs/ARB/vertex_array_object.txt

 

I forgot that vertex attributes are not necessarily in the same vbo (over 95 % of my vbo are filled with interleaved data).

 

Now, index buffer will get bound when binding the VAO. I guess i can still bind the index buffer separately after binding the VAO (which will update the VAO state every time though). If i do this, i will have to make sure to bind index buffer 0 if I render a VAO with no index buffer. Would that be a problem ? You see, my code base pretty much separates the vertex (and the vertext attribute specification) from the index.


PARTNERS