Examples of glPolygonMode()


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

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

        }
        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

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

      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

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

   
    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

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

        gl.glTexEnvi(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL2.GL_MODULATE);
        gl.glColor4f(1.0f, 1.0f, 1.0f, alpha);

        // reset the polygon mode
        gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL2.GL_FILL);

        gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, 1);

        // load identity modelview and projection matrix
        gl.glMatrixMode(GL2.GL_MODELVIEW);
View Full Code Here

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

        // Temporarily disable fragment and most 3D operations
        gl.glPushAttrib(GL2.GL_ENABLE_BIT | GL2.GL_TEXTURE_BIT | GL.GL_DEPTH_BUFFER_BIT | GL2.GL_POLYGON_BIT);
        disableAttribFor2D(gl);

        // Reset the polygon mode
        gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL2.GL_FILL);

        gl.glDepthMask(false);
        gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, 1);
        gl.glBindTexture(GL.GL_TEXTURE_2D, objectId);
        // set up texture parameter
View Full Code Here

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

        gl.glCullFace(GL.GL_BACK);
        gl.glEnable(GL.GL_CULL_FACE);

        gl.glLightModeli(GL2.GL_LIGHT_MODEL_TWO_SIDE, GL.GL_FALSE);

        gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL2.GL_FILL);

        gl.glPolygonOffset(0.0f, 0.0f);
        gl.glDisable(GL2.GL_POLYGON_OFFSET_POINT);
        gl.glDisable(GL2.GL_POLYGON_OFFSET_LINE);
        gl.glDisable(GL.GL_POLYGON_OFFSET_FILL);
View Full Code Here

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

            gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);
            gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MAG_FILTER, GL.GL_LINEAR);
        }

        // reset the polygon mode
        gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL2.GL_FILL);

        gl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, 1);

        // load identity modelview and projection matrix
        gl.glMatrixMode(GL2.GL_PROJECTION);
View Full Code Here

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

        } else {
            gl.glLightModeli(GL2.GL_LIGHT_MODEL_TWO_SIDE, GL.GL_FALSE);
        }

        if (polygonMode == PolygonAttributes.POLYGON_POINT) {
            gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL2.GL_POINT);
        } else if (polygonMode == PolygonAttributes.POLYGON_LINE) {
            gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL2.GL_LINE);
        } else {
            gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL2.GL_FILL);
        }
View Full Code Here

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

        }

        if (polygonMode == PolygonAttributes.POLYGON_POINT) {
            gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL2.GL_POINT);
        } else if (polygonMode == PolygonAttributes.POLYGON_LINE) {
            gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL2.GL_LINE);
        } else {
            gl.glPolygonMode(GL.GL_FRONT_AND_BACK, GL2.GL_FILL);
        }

        gl.glPolygonOffset(polygonOffsetFactor, polygonOffset);
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.