title: OpenGL buffers - Stride vs Tightly packed
body: <p>What are the pros and cons for using strided vertex buffers vs tighly packed buffers for each attribute? What I mean is for instance:</p>
  
  <p>Stride: <code>xyzrgb xyzrgb xyzrgb</code></p>
  
  <p>Tight: <code>xyzxyzxyz rgbrgbrgb</code></p>
  
  <p>At first glance it might look like you easily can change the size when using stride, but the content of the vertex buffer is deleted when you reallocate it with <code>glBufferData()</code>. </p>
  
  <p>For me it seems best to use the tight model since position, color, and texcoords might come from different arrays in the local memory and because there is no strided buffer data function; you must copy all the arrays into an interleaved buffer before uploading or use one <code>glBufferSubData()</code> per vertex per attribute (terrible idea I guess).</p>
  
  <p>There seems to be common practice to use interleaved buffer (stride). Why is that? Anything I am missing here?</p>