Hi, just wondering how i could control the length of an array using a variable.
e.g. i have the array -
obviously taking 5 points...but if i wanted the length to be as long as a variable (points) then how could this be done?
e.g. i have the array -
Code:
glBegin(GL_LINE_LOOP);
glVertex2iv(poly[0]);
glVertex2iv(poly[1]);
glVertex2iv(poly[2]);
glVertex2iv(poly[3]);
glVertex2iv(poly[4]);
glEnd();
obviously taking 5 points...but if i wanted the length to be as long as a variable (points) then how could this be done?