Metal-Programming-Guide icon indicating copy to clipboard operation
Metal-Programming-Guide copied to clipboard

Undefined variable vertexData on Page 65

Open jackxujh opened this issue 7 years ago • 1 comments

On page 65 in the printed version, which is the Your First Shader: Pass Through section in Chapter 5, there is a reference to an undefined variable called vertexData:

let vertexColorSize = vertexData.count * MemoryLayout<Float>.size

This variable is not defined elsewhere in the code either. Is there something missing?

jackxujh avatar Oct 26 '18 16:10 jackxujh

vertexData gets defined on p. 31 as the array of Floats for the 2D triangle.

thesammiller avatar Feb 09 '21 02:02 thesammiller