Package javax.media.opengl

Examples of javax.media.opengl.GL.glVertex3d()


       
        for ( Vector3 v: face) {
          gl.glNormal3d(n.x, n.y, n.z);
          //gl.glTexCoord2f(1.0f, 1.0f);
          //gl.glColor3d(v.a1, v.a2, v.a3);
          gl.glVertex3d(v.x, v.y, v.z);
          gl.glTexCoord2f(0.0f, 1.0f);
        }
        gl.glEnd();
      }
     
View Full Code Here


       
        for ( Vector3 v: face) {
          gl.glNormal3d(n.x, n.y, n.z);
          //gl.glTexCoord2f(1.0f, 1.0f);
          gl.glColor3d(0.2,0.2, 0.2);
          gl.glVertex3d(v.x, v.y, v.z);
          gl.glTexCoord2f(0.0f, 1.0f);
        }
        gl.glEnd();
      }
View Full Code Here

      Iterator<Vector3[]> i = shape.getFaces();
      while (i.hasNext()) {
        gl.glBegin(GL.GL_POLYGON);
        Vector3[] face = i.next();
        for ( Vector3 v: face) {
          gl.glVertex3d(v.x, v.y, v.z);
        }
        gl.glEnd();
      }
     
      gl.glPopMatrix();
View Full Code Here

//        gl.glStencilFunc(GL.GL_EQUAL, 0x01, 0x01);
       
        if (useGradient){
          gl.glBegin (GL.GL_QUADS);
            gl.glColor4f(x1R, x1G, x1B, x1A);
            gl.glVertex3d (minX, minY, 0.0);
            gl.glColor4f(x2R, x2G, x2B, x2A);
            gl.glVertex3d (maxX, minY, 0.0);
            gl.glColor4f(x3R, x3G, x3B, x3A);
            gl.glVertex3d (maxX, maxY, 0.0);
            gl.glColor4f(x4R, x4G, x4B, x4A);
View Full Code Here

        if (useGradient){
          gl.glBegin (GL.GL_QUADS);
            gl.glColor4f(x1R, x1G, x1B, x1A);
            gl.glVertex3d (minX, minY, 0.0);
            gl.glColor4f(x2R, x2G, x2B, x2A);
            gl.glVertex3d (maxX, minY, 0.0);
            gl.glColor4f(x3R, x3G, x3B, x3A);
            gl.glVertex3d (maxX, maxY, 0.0);
            gl.glColor4f(x4R, x4G, x4B, x4A);
            gl.glVertex3d (minX, maxY, 0.0);
          gl.glEnd ();
View Full Code Here

            gl.glColor4f(x1R, x1G, x1B, x1A);
            gl.glVertex3d (minX, minY, 0.0);
            gl.glColor4f(x2R, x2G, x2B, x2A);
            gl.glVertex3d (maxX, minY, 0.0);
            gl.glColor4f(x3R, x3G, x3B, x3A);
            gl.glVertex3d (maxX, maxY, 0.0);
            gl.glColor4f(x4R, x4G, x4B, x4A);
            gl.glVertex3d (minX, maxY, 0.0);
          gl.glEnd ();
        }else{
          gl.glBegin (GL.GL_QUADS);
View Full Code Here

            gl.glColor4f(x2R, x2G, x2B, x2A);
            gl.glVertex3d (maxX, minY, 0.0);
            gl.glColor4f(x3R, x3G, x3B, x3A);
            gl.glVertex3d (maxX, maxY, 0.0);
            gl.glColor4f(x4R, x4G, x4B, x4A);
            gl.glVertex3d (minX, maxY, 0.0);
          gl.glEnd ();
        }else{
          gl.glBegin (GL.GL_QUADS);
            gl.glVertex3d (minX, minY, 0.0);
            gl.glVertex3d (maxX, minY, 0.0);
View Full Code Here

            gl.glColor4f(x4R, x4G, x4B, x4A);
            gl.glVertex3d (minX, maxY, 0.0);
          gl.glEnd ();
        }else{
          gl.glBegin (GL.GL_QUADS);
            gl.glVertex3d (minX, minY, 0.0);
            gl.glVertex3d (maxX, minY, 0.0);
            gl.glVertex3d (maxX, maxY, 0.0);
            gl.glVertex3d (minX, maxY, 0.0);
          gl.glEnd ();
        }
View Full Code Here

            gl.glVertex3d (minX, maxY, 0.0);
          gl.glEnd ();
        }else{
          gl.glBegin (GL.GL_QUADS);
            gl.glVertex3d (minX, minY, 0.0);
            gl.glVertex3d (maxX, minY, 0.0);
            gl.glVertex3d (maxX, maxY, 0.0);
            gl.glVertex3d (minX, maxY, 0.0);
          gl.glEnd ();
        }
//        */
 
View Full Code Here

          gl.glEnd ();
        }else{
          gl.glBegin (GL.GL_QUADS);
            gl.glVertex3d (minX, minY, 0.0);
            gl.glVertex3d (maxX, minY, 0.0);
            gl.glVertex3d (maxX, maxY, 0.0);
            gl.glVertex3d (minX, maxY, 0.0);
          gl.glEnd ();
        }
//        */
        ////////////////////////////////////
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.