I am using OpenGL and C to create a 2D rendering engine. I am learning about VBOs and how to use them for non-immediate mode rendering. I have been reading from: http://www.opengl.org/wiki/Vertex_Buffer_Object
The tutorial suggests the following:
struct MyVertex
{
float x, y, z; //Vertex
float nx, ny, nz; //Normal
float s0, t0; //Texcoord0
float s1, t1; //Texcoord1
float s2, t2; //Texcoord2
float padding[4];
};
I do not need the Normal values, and I am unsure how or why there are three texture coordinates for a single vertex.
I think all I should need is Vertex (XYZ), and one Texcoord (s0, t0 <-- still do not know what those mean).
That was nothing more than an example; don't take that vertex format as gospel or even a suggestion. Indeed, in any serious application, one wouldn't use so many floats.
In any case, if you want to remove those attributes, that is fine. It's up to you.
As to why one might need 3 sets of texture coordinates, it would be because one has three sets of texture mappings to the surface. There are reasons for doing things like that, but it's fairly rare in practice.
Also, OpenGL has a different way of naming its texture coordinates. Rather than "UV" the way most other things do it, OpenGL uses "ST".