Metal-Programming-Guide
Metal-Programming-Guide copied to clipboard
Undefined variable vertexData on Page 65
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?
vertexData gets defined on p. 31 as the array of Floats for the 2D triangle.