Package javax.media.opengl

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


        boolean vattrDefined       = ((vdefined & GeometryArrayRetained.VATTR_FLOAT)    != 0);
        boolean textureDefined     = ((vdefined & GeometryArrayRetained.TEXCOORD_FLOAT) != 0);

        // Enable normalize for non-uniform scale (which rescale can't handle)
        if (isNonUniformScale) {
            gl.glEnable(GL2.GL_NORMALIZE);
        }

        // Define the data pointers
        if (floatCoordDefined) {
            fverts.position(0);
View Full Code Here


        color[1] = green;
        color[2] = blue;
        gl.glFogi(GL2.GL_FOG_MODE, GL2.GL_EXP);
        gl.glFogfv(GL2.GL_FOG_COLOR, color, 0);
        gl.glFogf(GL2.GL_FOG_DENSITY, density);
        gl.glEnable(GL2.GL_FOG);
    }


    // ---------------------------------------------------------------------
View Full Code Here

        color[2] = blue;
        gl.glFogi(GL2.GL_FOG_MODE, GL.GL_LINEAR);
        gl.glFogfv(GL2.GL_FOG_COLOR, color, 0);
        gl.glFogf(GL2.GL_FOG_START, (float) fdist);
        gl.glFogf(GL2.GL_FOG_END, (float) bdist);
        gl.glEnable(GL2.GL_FOG);
    }


    // ---------------------------------------------------------------------
View Full Code Here

        boolean vattrDefined       = ((vdefined & GeometryArrayRetained.VATTR_FLOAT)    != 0);
        boolean textureDefined     = ((vdefined & GeometryArrayRetained.TEXCOORD_FLOAT) != 0);

        // Enable normalize for non-uniform scale (which rescale can't handle)
        if (isNonUniformScale) {
            gl.glEnable(GL2.GL_NORMALIZE);
        }

        int coordoff = 3 * initialCoordIndex;
        // Define the data pointers
        if (floatCoordDefined) {
View Full Code Here

    cbstride = cstride * Buffers.SIZEOF_FLOAT;

        // Enable normalize for non-uniform scale (which rescale can't handle)
        if (isNonUniformScale) {
            gl.glEnable(GL2.GL_NORMALIZE);
        }

        /*** Handle non-indexed strip GeometryArray first *******/
        if (geo_type == GeometryRetained.GEO_TYPE_INDEXED_TRI_STRIP_SET ||
                geo_type == GeometryRetained.GEO_TYPE_INDEXED_TRI_FAN_SET   ||
View Full Code Here

    cbstride = cstride * Buffers.SIZEOF_FLOAT;

        // Enable normalize for non-uniform scale (which rescale can't handle)
        if (isNonUniformScale) {
            gl.glEnable(GL2.GL_NORMALIZE);
        }

        int startVertex = stride  * startVIndex;
        int startClrs   = cstride * startVIndex;
        if (clrs == verts) {
View Full Code Here

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

        if (!depthBufferEnableOverride) {
            if (depthBufferEnable) {
                gl.glEnable(GL.GL_DEPTH_TEST);
                gl.glDepthFunc(getFunctionValue(depthTestFunction));
            } else {
                gl.glDisable(GL.GL_DEPTH_TEST);
            }
        }
View Full Code Here

        }

        if (alphaTestFunction == RenderingAttributes.ALWAYS) {
            gl.glDisable(GL2.GL_ALPHA_TEST);
        } else {
            gl.glEnable(GL2.GL_ALPHA_TEST);
            gl.glAlphaFunc(getFunctionValue(alphaTestFunction), alphaTestValue);
        }

        if (ignoreVertexColors) {
            gl.glDisable(GL2.GL_COLOR_MATERIAL);
View Full Code Here

        }

        if (ignoreVertexColors) {
            gl.glDisable(GL2.GL_COLOR_MATERIAL);
        } else {
            gl.glEnable(GL2.GL_COLOR_MATERIAL);
        }

        if (rasterOpEnable) {
            gl.glEnable(GL.GL_COLOR_LOGIC_OP);
            switch (rasterOp) {
View Full Code Here

        } else {
            gl.glEnable(GL2.GL_COLOR_MATERIAL);
        }

        if (rasterOpEnable) {
            gl.glEnable(GL.GL_COLOR_LOGIC_OP);
            switch (rasterOp) {
                case RenderingAttributes.ROP_CLEAR:
                    gl.glLogicOp(GL.GL_CLEAR);
                    break;
                case RenderingAttributes.ROP_AND:
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.