Package javax.media.opengl

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


        if (caps.isTwoSidedStencilSupported()) {
            if (record.isValid()) {
                if (enable && !record.useTwoSided) {
                    gl.glEnable(GL2.GL_STENCIL_TEST_TWO_SIDE_EXT);
                } else if (!enable && record.useTwoSided) {
                    gl.glDisable(GL2.GL_STENCIL_TEST_TWO_SIDE_EXT);
                }
            } else {
                if (enable) {
                    gl.glEnable(GL2.GL_STENCIL_TEST_TWO_SIDE_EXT);
                } else {
View Full Code Here


                }
            } else {
                if (enable) {
                    gl.glEnable(GL2.GL_STENCIL_TEST_TWO_SIDE_EXT);
                } else {
                    gl.glDisable(GL2.GL_STENCIL_TEST_TWO_SIDE_EXT);
                }
            }
        }
        record.useTwoSided = enable;
    }
View Full Code Here

        final int glType = getGLType(type);
        if (!record.isValid() || typeEnabled != record.enabledOffsets.contains(type)) {
            if (typeEnabled) {
                gl.glEnable(glType);
            } else {
                gl.glDisable(glType);
            }
        }
    }

    private static void setOffset(final float factor, final float units, final OffsetStateRecord record) {
View Full Code Here

                            }
                        }
                    }

                } else {
                    gl.glDisable(GL2.GL_FRAGMENT_PROGRAM_ARB);
                }
            }

            if (!record.isValid()) {
                record.validate();
View Full Code Here

        if (!record.isValid() || record.enabled != enable) {
            if (enable) {
                gl.glEnable(GL.GL_CULL_FACE);
            } else {
                gl.glDisable(GL.GL_CULL_FACE);
            }
            record.enabled = enable;
        }
    }
View Full Code Here

            final MaterialStateRecord record) {
        if (!record.isValid() || face != record.colorMaterialFace || colorMaterial != record.colorMaterial) {
            final GL gl = GLContext.getCurrentGL();

            if (colorMaterial == ColorMaterial.None) {
                gl.glDisable(GLLightingFunc.GL_COLOR_MATERIAL);
            } else {
                final int glMat = getGLColorMaterial(colorMaterial);
                final int glFace = getGLMaterialFace(face);

                gl.getGL2().glColorMaterial(glFace, glMat);
View Full Code Here

    return false;//polygonAntialiasing;
  }
  private void applyPolygonAntialiasing() {
    GL gl = drawable.getGL();
    // !! Enabling this causes problems on most GFX Cards (though not on my FireGL)
    gl.glDisable(GL.GL_POLYGON_SMOOTH);
    gl.glHint(GL.GL_POLYGON_SMOOTH_HINT, GL.GL_NICEST);
  }
  private void applyPointAntialiasing() {
    GL gl = drawable.getGL();
    gl.glEnable(GL.GL_POINT_SMOOTH);
View Full Code Here

  private void applyLineAntialiasing() {
    GL gl = drawable.getGL();
    if(lineAntialiasing) {
      gl.glEnable(GL.GL_LINE_SMOOTH);
    } else {
      gl.glDisable(GL.GL_LINE_SMOOTH);
    }
    gl.glHint(GL.GL_LINE_SMOOTH_HINT, GL.GL_NICEST);
}
 
  // ==================== Drawing State ====================
View Full Code Here

    //    delegate.prepareExternalCode();
    GL gl = delegate.getGL();
   
    // Depth Testing
    gl.glDisable(GL.GL_DEPTH_TEST);
   
      gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);
     
      // Lighting, Coloring
      gl.glEnable(GL.GL_LIGHTING);
View Full Code Here

//    delegate.prepareExternalCode();
    GL gl = delegate.getGL();
   

    // Depth Testing
    gl.glDisable(GL.GL_DEPTH_TEST);
   
      gl.glHint(GL.GL_PERSPECTIVE_CORRECTION_HINT, GL.GL_NICEST);
     
      // Lighting, Coloring
      gl.glEnable(GL.GL_LIGHTING);
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.