I'm having a bit of a problem understanding this. Consider this code:
what is the layout of the vertices array? Is it
{x, y (bottom left)
x, y (bottom right)
x, y (top left)
x, y (top right)}
or is it some other layout? Basically what do the individual x, y co-ordinates refer too?
Code:
static GLint vertices[] = {25, 25,
100, 325,
175, 25,
175, 325,
250, 25,
325, 325};
static GLfloat colors[] = {1.0, 0.2, 0.2,
0.2, 0.2, 1.0,
0.8, 1.0, 0.2,
0.75, 0.75, 0.75,
0.35, 0.35, 0.35,
0.5, 0.5, 0.5};
glEnableClientState (GL_COLOR_ARRAY);
glEnableClientState (GL_VERTEX_ARRAY);
glColorPointer (3, GL_FLOAT, 0, colors);
glVertexPointer (2, GL_INT, 0, vertices);
what is the layout of the vertices array? Is it
{x, y (bottom left)
x, y (bottom right)
x, y (top left)
x, y (top right)}
or is it some other layout? Basically what do the individual x, y co-ordinates refer too?