Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GL11.glPushMatrix();
- GlStateManager.color(0.75f, 0.75f, 0.75f, 0.5f);
- GlStateManager.enableAlpha();
- GlStateManager.enableBlend();
- drawCircle(width/2, height/2, 100, 0, Math.PI * 2);
- public static void drawCircle(float x, float y, float radius, double angleBegin, double angleEnd){
- GL11.glBegin(GL11.GL_TRIANGLE_FAN);
- GL11.glVertex2f(x, y);
- for(double i = angleBegin; i <= angleEnd; i += Math.PI/40){
- GL11.glVertex2f(x + ((float)Math.cos(i) * radius), y + ((float)Math.sin(i) * radius));
- }
- GL11.glEnd();
- }
- GL11.glPopMatrix();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement