   VBOs & Indices - SOLVED
  If rendering with VBOs using indexed vertices (glDrawElements), will OpenGL assume indexed texture coordinate and/or color as well in their respectivelydefined VBOs?Some code to clarify...//As in, given a quad:GLfloat vertices = {-1,  -1,   0, 1,  -1,   0, 1,   1,   0, 1,  -1,   0 };//...//Drawn using indexed GL_TRIANGLESGLuint indices = { 0, 1, 2,    2, 3, 0 };// Which is correct?  Using 4 texture coordinates (indexed),// or 6, where index 2 and 0 in either triangle won't // necessarily be defined as having the same texture // coordinate.GLfloat tex_coor_i = { 0, 0,   1, 0,   1, 1,   0, 1 };GLfloat tex_coor_i = { 0, 0,   1, 0,   1, 1,   1, 1,   0, 1    0, 0 };[Edited by - zerothrillz on May 16, 2010 8:47:45 PM]
  Your first example is correct. The indices are used for all bound vertex attribute streams.;  Provided that they're all bound properly, yes, glDrawElements will index them properly as well.As a side note, why don't you use an interleaved VBO?  That way you set the VBO once, and then provide the offset & stride when setting your color/texture/etc pointers.   ;  Thanks for quick answers!  I'll look into VBOs as well, but as for now I'm pretty happy to have finally re-written my level geometry class to support rendering without the fixed-function pipeline.   