Package javax.microedition.khronos.opengles

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


        _buffers = new int[2];

        final GL11 gl = (GL11) g;
        gl.glGenBuffers(2, _buffers, 0);
        gl.glBindBuffer(GL11.GL_ARRAY_BUFFER, _buffers[0]);
        gl.glBufferData(GL11.GL_ARRAY_BUFFER, _verticesSize + _normalsSize
                + _texcoordsSize, vertices, GL11.GL_STATIC_DRAW);
        gl.glBindBuffer(GL11.GL_ELEMENT_ARRAY_BUFFER, _buffers[1]);
        gl.glBufferData(GL11.GL_ELEMENT_ARRAY_BUFFER, _indicesSize, indices,
                GL11.GL_STATIC_DRAW);
        gl.glBindBuffer(GL11.GL_ARRAY_BUFFER, 0);
View Full Code Here


        gl.glGenBuffers(2, _buffers, 0);
        gl.glBindBuffer(GL11.GL_ARRAY_BUFFER, _buffers[0]);
        gl.glBufferData(GL11.GL_ARRAY_BUFFER, _verticesSize + _normalsSize
                + _texcoordsSize, vertices, GL11.GL_STATIC_DRAW);
        gl.glBindBuffer(GL11.GL_ELEMENT_ARRAY_BUFFER, _buffers[1]);
        gl.glBufferData(GL11.GL_ELEMENT_ARRAY_BUFFER, _indicesSize, indices,
                GL11.GL_STATIC_DRAW);
        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.