0

I've been searching for an equation using OpenGl and Java to draw a 3d sphere. Kinda like x=blah blah math + y. Although using actual math. So far all I have is this which renders the items in a tower. How would I go about doing this?

GlStateManager.pushMatrix(); {

        GlStateManager.translate(x, y, z);
        GlStateManager.translate(1, -.825, 0.75);
        GlStateManager.rotate(90F, 0, 0, 1);
        GlStateManager.rotate(322.5F, 0, 1, 0);
        GlStateManager.translate(1.35, 0, -1.35);
        for(int i = 1; i < te.thpoothfyness; i++) {

            Minecraft.getMinecraft().getRenderManager().doRenderEntity(ITEM, 0, 0, 0, 0F, 0F, false);
            GlStateManager.translate(0.03125, 0, -0.03125);

        }

    }
    GlStateManager.popMatrix();
genpfault
  • 51,148
  • 11
  • 85
  • 139
  • See for example here: http://stackoverflow.com/questions/24137198/opengl-es-2-0-sphere. Not sure if this should be considered a duplicate, since it involves Minecraft, and I don't know if that would offer other options. – Reto Koradi Sep 01 '16 at 01:57
  • Possible duplicate of [Drawing Sphere in OpenGL without using gluSphere()?](http://stackoverflow.com/questions/7687148/drawing-sphere-in-opengl-without-using-glusphere) – Draco18s no longer trusts SE Sep 14 '16 at 16:27

0 Answers0