Here’s a simple example that draws a quad with per vertex position, color, and texcoords.
struct Vertex
{
float pos[3];
float color[4];
float st[2];
} quadVerts[4] = {
{{0,0,0} ,{1,0,0,1}, {0,0}},
{{0,100,0} ,{0,1,0,1}, {0,1}},
{{100,100,0},{0,0,1,1}, {1,1}},
{{100,0,0} ,{1,1,1,1}, {1,0}}
};
GLushort quadIndices[4] = { 0, 1, 2, 3 };
glVertexPointer(3, GL_FLOAT, sizeof(Vertex), quadVerts[0].pos);
glEnableClientState(GL_VERTEX_ARRAY);
glColorPointer(4, GL_FLOAT, sizeof(Vertex), quadVerts[0].color);
glEnableClientState(GL_COLOR_ARRAY);
glTexCoordPointer(2, GL_FLOAT, sizeof(Vertex), quadVerts[0].st);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glDrawElements(GL_QUADS, 4, GL_UNSIGNED_SHORT, quadIndices);
glDisableClientState(GL_COLOR_ARRAY);
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_TEXTURE_COORD_ARRAY);