Hi,
I am drawing a series of triangles using a for loop. These triangles are drawn using various values within arrays.
I can output the correct amount of triangles all at the correct size according to the array values. However I am wanting to output them in a line effect, one after the other.
So within my display method, I have a for loop, then I have something like this…
gl.glTriangles;
//for statement goes here…
//draw triangles here
//finish triangles here
gl.glTranslate(translateVariable, 0.0f, 0.0f);
translateVariable++;
//end for loop
So, I thought that this would then draw one triangle, then translate along the x axis a bit, draw another triangle, move along the x axis again… and so on. Until the for loop ends.
The triangles are all draw, but on top of one another, how can I make them draw one, then move along the x axis a little, draw the next, then again move along the x axis, etc.
Any help would be great! I’m thinking that its a simple error that I’m making!
Thanks