I just wanted to say that this UKposts channel is completely underrated! Thank you for all those great videos!
@GetIntoGameDevРік тому
You're welcome!
@2etime11 місяців тому
Looks great man! I want to do a tutorial on swift ui development with metal too. Once you have the views setup, it is just metal dev really lol! Def subscribing! :)
@arkemalРік тому
Excellent introduction to Metal. Thank you!
@richwickermanРік тому
Been looking for series like this
@EeroafHeurlinРік тому
Thank you for the excellent series, something that took me way too long to figure out however is: Don't put your shader structs in the bridging header, make a separate header ("shaderdata.h" or something) and import that in the bridging header and import the "shaderdata.h" in your .metal file. Because if you ever need to include anything else in the bridging header (say ) you will get *really* weird errors about incompatible architectures when the shaders are being compiled.
@GetIntoGameDevРік тому
Thankyou! I was not aware so I’m sure you’ve saved me a lot of future pain
@diegotrazziРік тому
Beautiful triangle!
@willisplummer9 місяців тому
for anyone following along a year later, to get the teal background to compile I had to change the type signature of makeUIView to `func makeUIView(context: UIViewRepresentableContext) -> UIView` instead of MTLView
@samator1236Рік тому
this is amazing thank you
@Ryan_Wiseman3 місяці тому
Swift is like the C# of C. It works far better than you'd expect. This has been a lot more easier to work with than VulkanSDK via VSCode (which while it works perfectly with Xcode, I do like the project management aesthetic of VSCode). Curious, would you ever do videos on implementing Metal with game development? There is a lot on developing games with Swift, but less involving Metal and Swift (and the ones that exist I'm sure are a bit dated)
@FunFradd2 роки тому
Author, thanks you please make more videos about Metal
@GetIntoGameDev2 роки тому
It’s on my roster!
@lancehui65262 місяці тому
Thinks for your videos!
@dmitryskripkin74172 роки тому
Wait-wait, I'm sure there were more videos about Metal just a few days ago! About sphere and snowman, did you just deleted older videos? A relaunch? Great work, it's pretty hard to find tutorials about Metal. Especially with latest Swift and SwiftUI. Official Apple examples suck, Obj-C is not what I want to learn today. I'm not an gamedev guy, just some amateur newbie generative artist. Thanks for your work.
@GetIntoGameDev2 роки тому
Yes, you’re right, I’m redoing the series. Don’t worry, Metal is very much on my radar, I’m fascinated with it. Thanks! Yeah it’s really tough finding info on it. Especially, as you say, the modern swiftui approach. I’m glad you’re getting something out of the series!
@dmitryskripkin74172 роки тому
@@GetIntoGameDev somehow I'm not able to debug Metal with SwiftUI (with boilerplate from your videos). Basic Obj-C examples works fine. I'm digging deeper to find reason for that. If you have any ideas that would be a great help. P.S. Metal debugger is killer feature for me.
@dmitryskripkin74172 роки тому
However it works with MacOS target and NSView instead of UIView. Wasted hours on googling it with no success. Lucky me I tried replacing the view class. No idea why it work only this way.
@GetIntoGameDev2 роки тому
@@dmitryskripkin7417 Interesting, so it can build MacOS but not ios. Maybe installing command line tools for xcode would help with that? Can your installation of xcode build other ios apps?
@monferaРік тому
From 12:00 - why is it OK to call `metalDevice.makeCommandQueue()` in row 22? It's not inside the `if let`. So `metalDevice` may be nil. There's no ? or !, it's just a straight method call. Also, it's an `if let` rather than a `guard`, so it won't exit the scope if `metalDevice` is nil. Sorry for the noob question :-)
@GetIntoGameDevРік тому
Hi Robert, great questions! So this puzzled me a bit too when I first saw it, it would appear the makeCommandQueue is returning a regular object and there's not need to unwrap. I guess the Metal API has a lot of faith in itself in this one case. And as for the if-let stuff, yes a guard statement is technically better, I guess I'm just so used to reading error messages for my debugging...
@roygalaasenРік тому
This is how they do it in the documentation: guard let device = MTLCreateSystemDefaultDevice() else { fatalError( "Failed to get the system's default Metal device." ) } So it can fail, and with a declaration of the variable with an exclamation mark, it will crash your app if it fails. Edit: so in this example it will crash either way, and perhaps the philosophy is that if this call fails, it is better to crash early, since it won’t run your application the way you want anyway?
@LamNguyen-zg1ft10 місяців тому
great video, man. but if i want to custom .metal file on my own. Where I must start from?
@GetIntoGameDev10 місяців тому
Hi, I’m not quite sure what that means. By .metal file, do you mean shaders?
@LamNguyen-zg1ft9 місяців тому
@@GetIntoGameDev yep, it's hard for me to understand Metal Shading Language.
@miguelsaldana5768Рік тому
why didn't you used UIKit? still is a MTKView hmmm amazing videos
@GetIntoGameDevРік тому
Thanks! I wanted to focus on SwiftUI as it's a newer framework and I haven't seen a lot of material around on SwiftUI x Metal.
@roger7341Рік тому
This is ridiculous. Why doesn't Apple just provide plug-and-play modules that work right out of the box? It takes all that work just to get a single triangle on the screen? And you have to learn another programming language to boot? All I want is to animate a few simple objects and program in C++ if I have to. How about a program that reads in some .obj files and lets me write some code in C++ that will move those objects around on the screen?
@GetIntoGameDevРік тому
Yeah it’s pretty messed up but the support isn’t there right now. I don’t know, maybe they’re too busy changing the m1 to an m2 on their marketing material. I hope it improves in the near future.