barbulescualex / MetalCircle

The complete project for my tutorial on how to render a circle to the screen using Metal Shaders
MIT License
16 stars 0 forks source link

Tutorial is too old to follow. #2

Open 7ombie opened 8 months ago

7ombie commented 8 months ago

As soon as you begin, the tutorial says to create a Cocoa App, but Xcode doesn't have that option any more. If you create a regular Swift App, it is not compatible with the code in the tutorial. You need to wrap the NSViewController to work with SwiftUI, and it's not obvious how to do that. It's a shame, as this would have been really useful. It's a good tutorial (and good tutorials for lower level stuff are rare). You should consider updating it to use SwiftUI.

I've downloaded the repo (it still compiles and executes correctly), and I'm learning a lot from what's there. I'm optimistic I'll figure it out.

- best -

7ombie commented 8 months ago

I figured out that it's actually still possible to follow this tutorial with Xcode. You have to select Swift as the language, but change the UI setting from SwiftUI to Storyboard. The boilerplate it generates is slightly different, but it'd wouldn't require much effort to update the tutorial.