As far as I know,
MemoryLayout<float3>.stride is used for making buffer and setting bytes for vertex/fragment functions.
I understand what stride and size are, but still have confusion when to use stride or size.
For example, in Chapter 4, p.119, is like:
let originalBuffer = device.makeBuffer( bytes: &vertices, length: MemoryLayout.stride * vertices.count, options: )
However, in Chapter 14, p.655, is like:
quadVerticesBuffer = Renderer.device.makeBuffer(bytes: quadVertices, length: MemoryLayout.size * quadVertices.count, options: )
Which one should I follow and why?