indexBuffer = ByteBuffer.allocateDirect(indices.length * 4).order( ByteOrder.nativeOrder()).asIntBuffer();
indexBuffer = ByteBuffer.allocateDirect( 4 * (triangleQuantity >= 0 ? triangleQuantity * 3 : indices.length)).order(ByteOrder.nativeOrder()) .asIntBuffer();
	public void updateIndexBuffer() {		if (indices == null) {			return;		}		IntBuffer indexBuffer = getIndexAsBuffer();		if (indexBuffer == null || indexBuffer.capacity() < indices.length) {			indexBuffer = ByteBuffer.allocateDirect(indices.length * 4).order(					ByteOrder.nativeOrder()).asIntBuffer();		}		indexBuffer.clear();		indexBuffer.put(indices, 0, indices.length);		indexBuffer.flip();		setIndexBuffer(indexBuffer);	}