Examples of glEnable()


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

        gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_NEAREST);
        gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_S, GL.GL_REPEAT);
        gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_WRAP_T, GL.GL_REPEAT);

        gl.glTexEnvf(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL.GL_REPLACE);
        gl.glEnable(GL.GL_BLEND);
        gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);

        gl.glEnable(GL.GL_TEXTURE_2D);

        // loaded identity modelview and projection matrix
View Full Code Here

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

        gl.glTexEnvf(GL2.GL_TEXTURE_ENV, GL2.GL_TEXTURE_ENV_MODE, GL.GL_REPLACE);
        gl.glEnable(GL.GL_BLEND);
        gl.glBlendFunc(GL.GL_SRC_ALPHA, GL.GL_ONE_MINUS_SRC_ALPHA);

        gl.glEnable(GL.GL_TEXTURE_2D);

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

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

        if (VERBOSE) System.err.println("JoglPipeline.resetPolygonAttributes()");

    GL2 gl = context(ctx).getGL().getGL2();

        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);
View Full Code Here

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

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

        disableAttribFor2D(gl);
        gl.glDepthMask(false);
        gl.glEnable(GL.GL_TEXTURE_2D);

        /* Setup filter mode if needed */
        if(useBilinearFilter) {
            // System.err.println("JoglPipeline - Background  : use bilinear filter\n");
            gl.glTexParameteri(GL.GL_TEXTURE_2D, GL.GL_TEXTURE_MIN_FILTER, GL.GL_LINEAR);
View Full Code Here

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

        if (!depthBufferWriteEnableOverride) {
            gl.glDepthMask(true);
        }
        if (!depthBufferEnableOverride) {
            gl.glEnable(GL.GL_DEPTH_TEST);
        }
        gl.glAlphaFunc(GL.GL_ALWAYS, 0.0f);
        gl.glDepthFunc(GL.GL_LEQUAL);
        gl.glEnable(GL2.GL_COLOR_MATERIAL);
        gl.glDisable(GL.GL_COLOR_LOGIC_OP);
View Full Code Here

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

        if (!depthBufferEnableOverride) {
            gl.glEnable(GL.GL_DEPTH_TEST);
        }
        gl.glAlphaFunc(GL.GL_ALWAYS, 0.0f);
        gl.glDepthFunc(GL.GL_LEQUAL);
        gl.glEnable(GL2.GL_COLOR_MATERIAL);
        gl.glDisable(GL.GL_COLOR_LOGIC_OP);
    }

    // native method for setting default texture
    @Override
View Full Code Here

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

                // Set up fields in Canvas3D
                setupCanvasProperties(cv, ctx, gl);
            }

            // Enable rescale normal
            gl.glEnable(GL2.GL_RESCALE_NORMAL);

            gl.glColorMaterial(GL.GL_FRONT_AND_BACK, GL2.GL_DIFFUSE);
            gl.glDepthFunc(GL.GL_LEQUAL);
            gl.glEnable(GL2.GL_COLOR_MATERIAL);
View Full Code Here

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

            // Enable rescale normal
            gl.glEnable(GL2.GL_RESCALE_NORMAL);

            gl.glColorMaterial(GL.GL_FRONT_AND_BACK, GL2.GL_DIFFUSE);
            gl.glDepthFunc(GL.GL_LEQUAL);
            gl.glEnable(GL2.GL_COLOR_MATERIAL);

            /*
            OpenGL specs:
               glReadBuffer specifies a color buffer as the source for subsequent glReadPixels.
               This source mode is initially GL_FRONT in single-buffered and GL_BACK in double-buffered configurations.
View Full Code Here

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

    GL2 gl = context(ctx).getGL().getGL2();

        if (transparencyMode != TransparencyAttributes.SCREEN_DOOR) {
            gl.glDisable(GL2.GL_POLYGON_STIPPLE);
        } else  {
            gl.glEnable(GL2.GL_POLYGON_STIPPLE);
            gl.glPolygonStipple(screen_door_table[(int)(alpha * 16)]);
        }

        if ((transparencyMode < TransparencyAttributes.SCREEN_DOOR) ||
                ((((geometryType & RenderMolecule.LINE) != 0) ||
View Full Code Here

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

                (polygonMode == PolygonAttributes.POLYGON_LINE))
                && lineAA) ||
                ((((geometryType & RenderMolecule.POINT) != 0) ||
                (polygonMode == PolygonAttributes.POLYGON_POINT))
                && pointAA)) {
            gl.glEnable(GL.GL_BLEND);
            // valid range of blendFunction 0..3 is already verified in shared code.
            gl.glBlendFunc(blendFunctionTable[srcBlendFunction], blendFunctionTable[dstBlendFunction]);
        } else {
            gl.glDisable(GL.GL_BLEND);
        }
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.