Package org.lwjgl.util.glu

Examples of org.lwjgl.util.glu.Sphere.draw()


    // create display list
    displayList = GL11.glGenLists(1);
    GL11.glNewList(displayList, GL11.GL_COMPILE);

    sphere.draw(radius, res, res);

    GL11.glEndList();
  }

  @Override
View Full Code Here


            Sphere sphere = new Sphere();

            glNewList(displayListSphere, GL11.GL_COMPILE);

            sphere.draw(1, 8, 8);

            glEndList();
        }

        glCallList(displayListSphere);
View Full Code Here

            Sphere sphere = new Sphere();
            sphere.setTextureFlag(true);

            glNewList(displayListSphere, GL11.GL_COMPILE);

            sphere.draw(1024, 16, 128);

            glEndList();
        }

        glCallList(displayListSphere);
View Full Code Here

      glPushMatrix();
      glTranslatef(p.getX(), p.getY(), p.getZ());
      Sphere s = new Sphere();
      s.setDrawStyle(GLU.GLU_FILL);
      s.setNormals(GLU.GLU_SMOOTH);
          s.draw(size, 30, 2);
      glPopMatrix();
     
      if (play) {
        p.setZ(p.getZ() + speed);
        if (p.getZ() > 0) {
View Full Code Here

        s.setOrientation(GLU.GLU_OUTSIDE)// normals point outwards
        s.setTextureFlag(true);             // generate texture coords
        GL11.glPushMatrix();
        {
          GL11.glRotatef(-90f, 1,0,0);    // rotate the sphere to align the axis vertically
          s.draw(1, facets, facets);              // run GL commands to draw sphere
        }
        GL11.glPopMatrix();
    }

    /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.