   Changing VAO vs enabling/disalbing attributes
  If I'm rendering the same thing in multiple passes, but say one pass uses positions/normals/texcoords and another is a shadow pass with coordinates only, should I use two separate VAOs, or should I glEnableVertexArrayAttribEXT/glDisableVertexArrayAttribEXT the various attributes and use a single VAO?  I'm interested in both cases where the VBOs are interleaved and separate.   
  Hi,Vertex array objects are the way to go if you don't have to many of them (http://www.g-truc.net/post-tech-full.html : "On AMD, it's up to +20% for less than 2000 VAOs. On nVidia, it's more performance than up to +20% but up to 200 VAOs"). You should try (if you can) to set identical types inputs in your shaders so you can use only one VAO though (don't hesitate to set "fake" data aswell) Like this : //---------------// shader01 : in vec4 in_a1;in vec4 in_b1;in vec3 in_c1;out vec4 out_cross;void main(){    // compute with a1 and b1    // but also affect c1 to a temp variable so that the in attrib has a name    vec4 out_cross = cross(in_a1,in_b1);    vec3 temp = in_c2;}//---------------// shader02 :in vec4 in_a2;in vec4 in_b2;in vec3 in_c2;out vec3 out_c;void main(){    // perform calculations with c2    // and activate a2 and b2    vec4 temp = in_a2 + in_b2;    out_c = in_c2;}//-----------Your VAO would hold then 3 attribPointers. Then you can change pointers with drawBaseVertex.Oh yeah and to give you an idea, using one VAO per mesh per pass should run fine... If you have several materials, use the same VAO, and use a call to one of the drawBaseVertex calls.Hope that helps !A   ;  Interesting solution.  So enabling/disabling attributes is not a good idea then?  I'm just a bit worried about making the shaders have too much extra cruft to handle all possible attributes   ;  Enabling and disabling is a good solution, but you'll find that it's very hard to handle properly since once your VAO is created you can't access the vertex state it represents. So that means you have to hard code the enabling disabling attributes ID which isn't very elegant, and is very hard to debug in case of problem (sometimes the enable/disable will come from higher data structures)...One solution is to create some semantics for vertex attributes (binding 1 for positions, 2 for normals, etc...) which would be used in your entire applications (so it would be like using vertexattribPointer, etc.. again). Personnaly I don't use this because you never know which and how many attributes you are going to need, and you are limited (for now) to 16 declarations (since MAX_ATTRIB is 16).When you bind a new VAO the old vertex state is flushed so you can draw without worrying wether or not you are going to have too many or not enough vertex attriubtes since in matches the shader's inputs, and it's very fast! So I would definitely advise you to use VAOs and VAOs, but always keep in mind you mustn't have too many, and use the hack I presented if necessary aswell!   