Package javax.media.opengl

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


      //Enable the first light and the lighting mode
      gl.glEnable(GL.GL_LIGHT0);
      gl.glEnable(GL.GL_LIGHTING);
       
      // material
        gl.glEnable(GL.GL_COLOR_MATERIAL)// Enable Color Material
    gl.glEnable(GL.GL_ALPHA);
        // shading
        gl.glShadeModel(GL.GL_SMOOTH);
        gl.glEnable(GL.GL_TEXTURE_2D);
        gl.glActiveTexture(GL.GL_TEXTURE0);
View Full Code Here


      gl.glEnable(GL.GL_LIGHT0);
      gl.glEnable(GL.GL_LIGHTING);
       
      // material
        gl.glEnable(GL.GL_COLOR_MATERIAL)// Enable Color Material
    gl.glEnable(GL.GL_ALPHA);
        // shading
        gl.glShadeModel(GL.GL_SMOOTH);
        gl.glEnable(GL.GL_TEXTURE_2D);
        gl.glActiveTexture(GL.GL_TEXTURE0);
        try {
View Full Code Here

      // material
        gl.glEnable(GL.GL_COLOR_MATERIAL)// Enable Color Material
    gl.glEnable(GL.GL_ALPHA);
        // shading
        gl.glShadeModel(GL.GL_SMOOTH);
        gl.glEnable(GL.GL_TEXTURE_2D);
        gl.glActiveTexture(GL.GL_TEXTURE0);
        try {
      GetTextures(gl);
      System.out.println("Textures");
     
View Full Code Here

        if (strict) {
            // grab our camera to get width and height info.
            final Camera cam = Camera.getCurrentCamera();

            gl.glEnable(GL.GL_SCISSOR_TEST);
            gl.glScissor(0, 0, cam.getWidth(), cam.getHeight());
            record.setClippingTestEnabled(true);
        }

        gl.glClear(clear);
View Full Code Here

                                    && caps.isOpenGL1_2Supported()
                                    && rendRecord.getNormalMode() != GL2ES1.GL_RESCALE_NORMAL) {
                                if (rendRecord.getNormalMode() == GLLightingFunc.GL_NORMALIZE) {
                                    gl.glDisable(GLLightingFunc.GL_NORMALIZE);
                                }
                                gl.glEnable(GL2ES1.GL_RESCALE_NORMAL);
                                rendRecord.setNormalMode(GL2ES1.GL_RESCALE_NORMAL);
                            } else if (rendRecord.getNormalMode() != GLLightingFunc.GL_NORMALIZE) {
                                if (rendRecord.getNormalMode() == GL2ES1.GL_RESCALE_NORMAL) {
                                    gl.glDisable(GL2ES1.GL_RESCALE_NORMAL);
                                }
View Full Code Here

                                rendRecord.setNormalMode(GL2ES1.GL_RESCALE_NORMAL);
                            } else if (rendRecord.getNormalMode() != GLLightingFunc.GL_NORMALIZE) {
                                if (rendRecord.getNormalMode() == GL2ES1.GL_RESCALE_NORMAL) {
                                    gl.glDisable(GL2ES1.GL_RESCALE_NORMAL);
                                }
                                gl.glEnable(GLLightingFunc.GL_NORMALIZE);
                                rendRecord.setNormalMode(GLLightingFunc.GL_NORMALIZE);
                            }
                        } else {
                            if (rendRecord.getNormalMode() == GL2ES1.GL_RESCALE_NORMAL) {
                                gl.glDisable(GL2ES1.GL_RESCALE_NORMAL);
View Full Code Here

                            // *might* be scaled...
                            if (rendRecord.getNormalMode() != GLLightingFunc.GL_NORMALIZE) {
                                if (rendRecord.getNormalMode() == GL2ES1.GL_RESCALE_NORMAL) {
                                    gl.glDisable(GL2ES1.GL_RESCALE_NORMAL);
                                }
                                gl.glEnable(GLLightingFunc.GL_NORMALIZE);
                                rendRecord.setNormalMode(GLLightingFunc.GL_NORMALIZE);
                            }
                        } else {
                            // not scaled
                            if (rendRecord.getNormalMode() == GL2ES1.GL_RESCALE_NORMAL) {
View Full Code Here

                case AlwaysNormalize:
                    if (rendRecord.getNormalMode() != GLLightingFunc.GL_NORMALIZE) {
                        if (rendRecord.getNormalMode() == GL2ES1.GL_RESCALE_NORMAL) {
                            gl.glDisable(GL2ES1.GL_RESCALE_NORMAL);
                        }
                        gl.glEnable(GLLightingFunc.GL_NORMALIZE);
                        rendRecord.setNormalMode(GLLightingFunc.GL_NORMALIZE);
                    }
                    break;
                case UseProvided:
                default:
View Full Code Here

            lineRecord.width = lineWidth;
        }

        if (stipplePattern != (short) 0xFFFF) {
            if (!lineRecord.isValid() || !lineRecord.stippled) {
                gl.glEnable(GL2.GL_LINE_STIPPLE);
                lineRecord.stippled = true;
            }

            if (!lineRecord.isValid() || stippleFactor != lineRecord.stippleFactor
                    || stipplePattern != lineRecord.stipplePattern) {
View Full Code Here

            lineRecord.stippled = false;
        }

        if (antialiased) {
            if (!lineRecord.isValid() || !lineRecord.smoothed) {
                gl.glEnable(GL.GL_LINE_SMOOTH);
                lineRecord.smoothed = true;
            }
            if (!lineRecord.isValid() || lineRecord.smoothHint != GL.GL_NICEST) {
                gl.glHint(GL.GL_LINE_SMOOTH_HINT, GL.GL_NICEST);
                lineRecord.smoothHint = GL.GL_NICEST;
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.