Package javax.media.opengl

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


     
     
      //gl.glPushMatrix();
//      gl.glMultMatrixd(Matrix4.pack(shape.getTransform()),0);
     
      gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_FILL);
      Iterator<Vector3[]> i = shape.getFaces();
      while (i.hasNext()) {
        gl.glBegin(GL.GL_POLYGON);
        Vector3[] face = i.next();
        //compute normal
View Full Code Here


        }
        gl.glEnd();
      }
     
     
      gl.glPolygonMode( GL.GL_FRONT, GL.GL_LINE );
      gl.glLineWidth(1.7f);
      gl.glDisable(GL.GL_LIGHTING);
      gl.glScaled(1.01, 1.01, 1.01);
      i = shape.getFaces();
      while (i.hasNext()) {
View Full Code Here

      gl.glPushMatrix();
      gl.glMultMatrixd(shape.getTransform().toArray(), 0);
//      gl.glMultMatrixd(Matrix4.pack(dt.shape.getTransform()),0);


      gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_FILL);
      Iterator<Vector3[]> i = shape.getFaces();
      while (i.hasNext()) {
        gl.glBegin(GL.GL_POLYGON);
        Vector3[] face = i.next();
        for ( Vector3 v: face) {
View Full Code Here

   
    gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT)//Clear the buffers
    gl.glLoadIdentity();                      //Reset the view
    gl.glTranslatef(0.0f, -2.0f, zOffset);              //Translate the scene backwards   
   
    gl.glPolygonMode(GL.GL_FRONT_AND_BACK, render_mode);
    gl.glCullFace(GL.GL_FRONT);
    gl.glEnable(GL.GL_CULL_FACE);/**/
   
        gl.glRotatef(xRot, 1f, 0f, 0f);
        gl.glRotatef(yRot, 0f, 1f, 0f);
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.