public static IntBuffer Wrap(int[] data) { IntBuffer buf = new IntBuffer(new byte[data.Length * 4], 0, data.Length * 4); for (int i = 0; i < data.Length; i++) { buf.PutInt(data[i]); } return buf; }