Code example for ShortBuffer

Methods: flip, put

0
		vertices.flip();
 
		buffer = ByteBuffer.allocateDirect(3 * 2);
		buffer.order(ByteOrder.nativeOrder());
		indices = buffer.asShortBuffer();
		indices.put(new short[] {0, 1, 2});
		indices.flip();
	} 
 
	@Override 
	public boolean needsGL20 () { 
		return false; 
	} 
}