Package javax.media.opengl

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


          //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();
      }
     
     
      gl.glPolygonMode( GL.GL_FRONT, GL.GL_LINE );
      gl.glLineWidth(1.7f);
View Full Code Here


          //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();
      }

   
      gl.glEnable(GL.GL_LIGHTING);
View Full Code Here

        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.glColor3f(0.0f, 1.0f, 0.0f);    // Set the current drawing color to green
            gl.glVertex3f(-1.0f, -1.0f, 0.0f); // Bottom Left
            gl.glColor3f(0.0f, 0.0f, 1.0f);    // Set the current drawing color to blue
            gl.glVertex3f(1.0f, -1.0f, 0.0f)// Bottom Right
        // Finished Drawing The Triangle
        gl.glEnd();

        // Move the "drawing cursor" to another position
        gl.glTranslatef(3.0f, 0.0f, 0.0f);
        // Draw A Quad
        gl.glBegin(GL.GL_QUADS);
View Full Code Here

            gl.glVertex3f(-1.0f, 1.0f, 0.0f)// Top Left
            gl.glVertex3f(1.0f, 1.0f, 0.0f);   // Top Right
            gl.glVertex3f(1.0f, -1.0f, 0.0f)// Bottom Right
            gl.glVertex3f(-1.0f, -1.0f, 0.0f); // Bottom Left
        // Done Drawing The Quad
        gl.glEnd();

        // Flush all drawing operations to the graphics card
        gl.glFlush();
    }
View Full Code Here

      gl.glVertex3f(r1 * (float) Math.cos(angle + 3 * da), r1
          * (float) Math.sin(angle + 3 * da), -width * 0.5f);
      gl.glVertex3f(r0 * (float) Math.cos(angle), r0
          * (float) Math.sin(angle), -width * 0.5f);
    }
    gl.glEnd();
    gl.glPopMatrix();
  }
 
  @Override
  public void init(GLAutoDrawable drawable) {
View Full Code Here

          if(particles[i].alpha > 0) {
            particles[i].update();
            particles[i].drawOldSchool(gl);    // use oldschool renderng
          }
        }
        gl.glEnd();
      }

//      gl.glDisable(GL.GL_BLEND);
      //Reset blendfunction
      gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);
View Full Code Here

            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);
            gl.glVertex3d (maxX, maxY, 0.0);
View Full Code Here

          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 ();
        }
//        */
        ////////////////////////////////////
//        gl.glDepthMask(true); //Disabled to avoid too many state switches,
        gl.glDisable (GL.GL_STENCIL_TEST);   //Disabled to avoid too many state switches
View Full Code Here

        for (Vertex[] outline : outLines){
         gl.glBegin (GL.GL_LINE_STRIP);
           for (Vertex vertex : outline){
             gl.glVertex3f (vertex.getX(), vertex.getY(), vertex.getZ());
           }
          gl.glEnd();
      }
      ////
//      gl.glDisable (GL.GL_LINE_SMOOTH);
        //FIXME TEST
      Tools3D.setLineSmoothEnabled(gl, false);
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.