Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1.     //----------------------------------------------
  2.     // Circle
  3.     //----------------------------------------------
  4.     void Circle( Float x, Float y, Float r, const Color& vColor)
  5.     {
  6.         SetColor( vColor );
  7.         glBegin( GL_TRIANGLE_FAN );
  8.             glVertex2f( x, y );
  9.             for( Float i = 0; i <= 2 * PI + 0.1; i += 0.1 )
  10.             {
  11.                 glVertex2f( x + sin( i ) * r, y + cos( i ) * r );
  12.             }
  13.         glEnd();
  14.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement