*/
private void initBuffers() {
buffer = glContext.createBuffer();
glContext.bindBuffer(WebGLRenderingContext.ARRAY_BUFFER, buffer);
Float32Array vertices = Float32Array.create(cube.getVertices());
texCoordsOffset = vertices.getByteLength();
Float32Array texCoords = Float32Array.create(cube.getTexCoords());
glContext.bufferData(WebGLRenderingContext.ARRAY_BUFFER,
vertices.getByteLength() + texCoords.getByteLength(),
WebGLRenderingContext.STATIC_DRAW);
glContext
.bufferSubData(WebGLRenderingContext.ARRAY_BUFFER, 0, vertices);
glContext.bufferSubData(WebGLRenderingContext.ARRAY_BUFFER,