Hi,
I'm trying to port this to Swift. https://developer.apple.com/documentation/metal/hello_triangle
To get it to run I had to add the following line to the renderer class. Any idea why it's not needed in the Objective-C version?
pipelineStateDescriptor.depthAttachmentPixelFormat = metalView.depthStencilPixelFormat
Without it I get an error: -[MTLDebugRenderCommandEncoder validateFramebufferWithRenderPipelineState:]:1232: failed assertion `For depth attachment, the render pipeline's pixelFormat (MTLPixelFormatInvalid) does not match the framebuffer's pixelFormat (MTLPixelFormatDepth32Float).'
Rob