Examples of glDisableClientState()


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

        }

        if ((vformat & GeometryArray.COORDINATES) != 0) {
            gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);
        } else {
            gl.glDisableClientState(GL2.GL_VERTEX_ARRAY);
        }
    }

    // used for GeometryArrays
    @Override
View Full Code Here

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

            // create and write GL buffer
            gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);
                gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, id[0]);
                gl.glBufferData(GL2.GL_ARRAY_BUFFER, glData.capacity()*4, glData, GL2.GL_STATIC_DRAW);
                gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0);
            gl.glDisableClientState(GL2.GL_VERTEX_ARRAY);
            gl.glFinish();
           

            // create CLGL buffer
            IntBuffer clData = Buffers.newDirectIntBuffer(9);
View Full Code Here

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

            gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);
                gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, glObjects[VERTICES]);
                gl.glBufferData(GL2.GL_ARRAY_BUFFER, BUFFER_SIZE, null, GL2.GL_DYNAMIC_DRAW);
                gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0);
            gl.glDisableClientState(GL2.GL_VERTEX_ARRAY);

            pushPerspectiveView(gl);
            gl.glFinish();

            // init OpenCL
View Full Code Here

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

//            gl.glBindBuffer(GL2.GL_ELEMENT_ARRAY_BUFFER, glObjects[INDICES]);

        gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);
        gl.glDrawArrays(GL2.GL_POINTS, 0, MESH_SIZE * MESH_SIZE);
//            gl.glDrawElements(GL2.GL_TRIANGLES, ib.capacity(), GL2.GL_UNSIGNED_INT, 0);
        gl.glDisableClientState(GL2.GL_VERTEX_ARRAY);

//            gl.glBindBuffer(GL2.GL_ARRAY_BUFFER, 0);

    }

View Full Code Here

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

            gl.glLineWidth(1.0f);

            gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);
            gl.glEnableClientState(GL2.GL_COLOR_ARRAY);
            gl.glDrawArrays( GL.GL_LINES, 0, numberOfVertices);
            gl.glDisableClientState(GL2.GL_COLOR_ARRAY);
            gl.glDisableClientState(GL2.GL_VERTEX_ARRAY);
        }
        // Traditional OpenGL
        else {
            // TODO: By using a GL_LINE_STRIP I can easily use half the number of
View Full Code Here

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

            gl.glEnableClientState(GL2.GL_VERTEX_ARRAY);
            gl.glEnableClientState(GL2.GL_COLOR_ARRAY);
            gl.glDrawArrays( GL.GL_LINES, 0, numberOfVertices);
            gl.glDisableClientState(GL2.GL_COLOR_ARRAY);
            gl.glDisableClientState(GL2.GL_VERTEX_ARRAY);
        }
        // Traditional OpenGL
        else {
            // TODO: By using a GL_LINE_STRIP I can easily use half the number of
            //       verticies. May lose some control over line colors though.
View Full Code Here

Examples of javax.microedition.khronos.opengles.GL11.glDisableClientState()

        gl.glDrawElements(GL10.GL_TRIANGLES, _indicesSize / 2,
                GL10.GL_UNSIGNED_SHORT, 0);

        if (_vertexAttribIndex != -1) {
            gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
        }

        if (_normalAttribIndex != -1 && _normalsSize > 0) {
            gl.glDisableClientState(GL10.GL_NORMAL_ARRAY);
        }
View Full Code Here

Examples of javax.microedition.khronos.opengles.GL11.glDisableClientState()

        if (_vertexAttribIndex != -1) {
            gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
        }

        if (_normalAttribIndex != -1 && _normalsSize > 0) {
            gl.glDisableClientState(GL10.GL_NORMAL_ARRAY);
        }

        if (_texcoordAttribIndex != -1 && _texcoordsSize > 0) {
            gl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
        }
View Full Code Here

Examples of javax.microedition.khronos.opengles.GL11.glDisableClientState()

        if (_normalAttribIndex != -1 && _normalsSize > 0) {
            gl.glDisableClientState(GL10.GL_NORMAL_ARRAY);
        }

        if (_texcoordAttribIndex != -1 && _texcoordsSize > 0) {
            gl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
        }

        gl.glBindBuffer(GL11.GL_ARRAY_BUFFER, 0);
        gl.glBindBuffer(GL11.GL_ELEMENT_ARRAY_BUFFER, 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.