Advertisement
Guest User

Untitled

a guest
Oct 24th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. void DrawSquares(float X1, float X2, float Y1, float Y2, int Squares, int Amount)
  2. {
  3. do
  4. {
  5. glLineWidth(2.0);
  6. glBegin(GL_LINE_LOOP);
  7. glColor3f(0.0, 255.0, 0.0);
  8.  
  9.  
  10. glVertex2f(X1, Y1);
  11. glVertex2f(X2, Y1);
  12. glVertex2f(X2, Y2);
  13. glVertex2f(X1, Y2);
  14.  
  15. X1 += 200 / Amount;
  16. X2 -= 200 / Amount;
  17. Y1 += 200 / Amount;
  18. Y2 -= 200 / Amount;
  19. Squares += 1;
  20.  
  21. glEnd();
  22. } while (Squares != Amount);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement