[QUOTE=Alfonse Reinheart;1265570]The sequence of vertices is processed in accord with the primitive parameter you provide. GL_TRIANGLES, as a primitive type, means that every individual set of 3 vertices, in order, is an independent triangle. Vertices (0, 1, 2) become the first triangle, with (3, 4, 5) being the second, and so on.
Other primitive types operate on the sequence of vertices differently.[/QUOTE]
Im afraid I disagree to you a little bit. Which will be the second or third… ? depend on the argument of the command glDrawArrayS(GL_TRIANGLES, i, i+3); where variable i can be 0,1,…,n; for your example,
(0,1,2,3,4,5,6,…), 0,1,2can be the first one, and 1,2,3can be the second, but 2,3,4 can also be the second ,this depends on the value of variable i. where i can also be regrard as index.
for (int i=0; i<1002; i++) {
glDrawArrays(GL_TRIANGLES,0+i,3+i);
}; //draw 1000 triangles.
if you want three sequency points as a group to form a triangle, you can,
for (int i=0; i<630; i++) {
glDrawArrays(GL_TRIANGLES,3i,3(i+1)); //wehre i=0,1,2…
};
//draw two hundreds and ten triangles., which every three points in order as a group.