Package javax.media.opengl

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


        int[] sarray = null;
        int strip_len = 0;
        boolean useAlpha = false;

        if ((vformat & GeometryArray.COORDINATES) != 0) {
            gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);
            stride += 3;
        } else {
            gl.glDisableClientState(GL2.GL_VERTEX_ARRAY);
        }
View Full Code Here


        } else {
            gl.glDisableClientState(GL2.GL_VERTEX_ARRAY);
        }

        if ((vformat & GeometryArray.NORMALS) != 0) {
            gl.glEnableClientState(GL2.GL_NORMAL_ARRAY);
            stride += 3;
            coordoff += 3;
        } else {
            gl.glDisableClientState(GL2.GL_NORMAL_ARRAY);
        }
View Full Code Here

        } else {
            gl.glDisableClientState(GL2.GL_NORMAL_ARRAY);
        }

        if ((vformat & GeometryArray.COLOR) != 0) {
            gl.glEnableClientState(GL2.GL_COLOR_ARRAY);
            stride += 4;
            normoff += 4;
            coordoff += 4;
        } else {
            gl.glDisableClientState(GL2.GL_COLOR_ARRAY);
View Full Code Here

            byteColorsDefined = false;
        }

        // get coordinate array
        if (floatCoordDefined) {
            gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);
            fverts = getVertexArrayBuffer(vfcoords, (xform == null));
            if (xform != null) {
                // Must copy in and transform data
                for (int i = initialCoordIndex; i < vcount * 3; i += 3) {
                    fverts.put(i  , (float) (xform[0* vfcoords[i] +
View Full Code Here

                            xform[9* vfcoords[i+1] +
                            xform[10] * vfcoords[i+2]));
                }
            }
        } else if (doubleCoordDefined) {
            gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);
            dverts = getVertexArrayBuffer(vdcoords, (xform == null));
            if (xform != null) {
                // Must copy in and transform data
                for (int i = initialCoordIndex; i < vcount * 3; i += 3) {
                    dverts.put(i  , (xform[0* vdcoords[i] +
View Full Code Here

            gl.glDisableClientState(GL2.GL_VERTEX_ARRAY);
        }

        // get color array
        if (floatColorsDefined) {
            gl.glEnableClientState(GL2.GL_COLOR_ARRAY);
            fclrs = getColorArrayBuffer(cfdata, !useAlpha);
            if (useAlpha) {
                // Must copy in and modify color data
                if ((vformat & GeometryArray.WITH_ALPHA) != 0) {
                    for (int i = initialColorIndex; i < vcount * 4; i += 4) {
View Full Code Here

                    }
                }
                vformat |= GeometryArray.WITH_ALPHA;
            }
        } else if (byteColorsDefined) {
            gl.glEnableClientState(GL2.GL_COLOR_ARRAY);
            bclrs = getColorArrayBuffer(cbdata, !useAlpha);
            if (useAlpha) {
                // Must copy in and modify color data
                if ((vformat & GeometryArray.WITH_ALPHA) != 0) {
                    for (int i = initialColorIndex; i < vcount * 4; i += 4) {
View Full Code Here

            gl.glDisableClientState(GL2.GL_COLOR_ARRAY);
        }

        // get normal array
        if (normalsDefined) {
            gl.glEnableClientState(GL2.GL_NORMAL_ARRAY);
            norms = getNormalArrayBuffer(ndata, (nxform == null));
            if (nxform != null) {
                // Must copy in and transform data
                for (int i = initialNormalIndex; i < vcount * 3; i += 3) {
                    norms.put(i  , (float) (nxform[0* ndata[i] +
View Full Code Here

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

        // Enable and disable the appropriate pointers
        if ((vformat & GeometryArray.NORMALS) != 0) {
            gl.glEnableClientState(GL2.GL_NORMAL_ARRAY);
        } else {
            gl.glDisableClientState(GL2.GL_NORMAL_ARRAY);
        }
        if (!ignoreVertexColors && ((vformat & GeometryArray.COLOR) != 0)) {
            gl.glEnableClientState(GL2.GL_COLOR_ARRAY);
View Full Code Here

            gl.glEnableClientState(GL2.GL_NORMAL_ARRAY);
        } else {
            gl.glDisableClientState(GL2.GL_NORMAL_ARRAY);
        }
        if (!ignoreVertexColors && ((vformat & GeometryArray.COLOR) != 0)) {
            gl.glEnableClientState(GL2.GL_COLOR_ARRAY);
        } else {
            gl.glDisableClientState(GL2.GL_COLOR_ARRAY);
        }

        if ((vformat & GeometryArray.COORDINATES) != 0) {
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.