Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void DrawSquares(float X1, float X2, float Y1, float Y2, int Squares, int Amount)
- {
- do
- {
- glLineWidth(2.0);
- glBegin(GL_LINE_LOOP);
- glColor3f(0.0, 255.0, 0.0);
- glVertex2f(X1, Y1);
- glVertex2f(X2, Y1);
- glVertex2f(X2, Y2);
- glVertex2f(X1, Y2);
- X1 += 200 / Amount;
- X2 -= 200 / Amount;
- Y1 += 200 / Amount;
- Y2 -= 200 / Amount;
- Squares += 1;
- glEnd();
- } while (Squares != Amount);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement