Advertisement
Guest User

Untitled

a guest
May 27th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. GL11.glPushMatrix();
  2. GlStateManager.color(0.75f, 0.75f, 0.75f, 0.5f);
  3. GlStateManager.enableAlpha();
  4. GlStateManager.enableBlend();
  5.  
  6. drawCircle(width/2, height/2, 100, 0, Math.PI * 2);
  7. public static void drawCircle(float x, float y, float radius, double angleBegin, double angleEnd){
  8. GL11.glBegin(GL11.GL_TRIANGLE_FAN);
  9. GL11.glVertex2f(x, y);
  10. for(double i = angleBegin; i <= angleEnd; i += Math.PI/40){
  11. GL11.glVertex2f(x + ((float)Math.cos(i) * radius), y + ((float)Math.sin(i) * radius));
  12. }
  13. GL11.glEnd();
  14. }
  15.  
  16. GL11.glPopMatrix();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement