hi all. im reading the new opengl programming guide and there is something that is uffer bound the bunclear to me about indexing. on page 122 the list of vertices and colors bound to GL_ARRAY_BUFFER are not seperated into seperate vertices by a set of curly braces, ie:
the way it is in the book:
float vertices[]{
0.5, 0, 1.5, 1,
0.5, 1, 1.2, 1,
-0.5, 1, 1.3, 1
};
the way i thought it was until i found the example:
float vertices[][]{
{0.5, 0, 1.5, 1},
{0.5, 1, 1.2, 1},
{-0.5, 1, 1.3, 1}
};
so how does it read the vertexes when they aren’t seperated and do you have to specify the size (number of elements in vertex) of the vertex to the program at some point and if so how do you do that?
thanks alot