Package org.lwjgl.util.glu

Examples of org.lwjgl.util.glu.Sphere


    private void drawSkysphere() {
        if (displayListSphere == -1) {
            displayListSphere = glGenLists(1);

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

            glNewList(displayListSphere, GL11.GL_COMPILE);

            sphere.draw(1024, 16, 128);

            glEndList();
        }

        glCallList(displayListSphere);
View Full Code Here


  public void draw(boolean play) {
    glColor3f(0.7f, 0.7f, 0.7f);
    for (Point3D p : this.stones) {
      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

     * call the LWJGL Sphere class to draw sphere geometry
     * with texture coordinates and normals
     * @param facets  number of divisions around longitude and latitude
     */
    public static void renderSphere(int facets) {
        Sphere s = new Sphere();            // an LWJGL class
        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

Related Classes of org.lwjgl.util.glu.Sphere

Copyright © 2018 www.massapicom. 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.