mergeconflict309 === [00:00:00] James: This week sponsored by our good friends over at sink fusion. Listen, are you looking for beautiful, amazing controls for any of your application? No matter what you are building, they have controls for you, including dotnet Maui controls. That's right. Charts, graphs, controls, optimize list, view, slider range, sliders, selectors, schedulers, bad views, tab view, and powerful document processing libraries like Excel. PDF word and PowerPoint. Check out, sing fusion to see why I love them. And I know you will as well for all of your applications. Go to sync, fusion.com/merge conflict to learn more. Thanks to St. Fusion for sponsoring this week's pod Frank Krueger. It has been years upon years that both apple and Google have told us, in fact, Yelled at us that there might be a point in time that an API may get removed. And Frank, that that day has come. It has happened. I'm sorry. You can't deny it. You can't, you can't deny it. They told you for five years, they told you forever. They said, Hey. This is introduced in iOS one point. Now we may remove it in the future. [00:01:19] Frank: Yes, James. Yes. Uh, turns out deprecated does mean we will remove it at some point. So what we are going to talk about today is the sad, very, very sad removal of open GL from Mac catalyst apps. And I say removal, even though it turns out Matt catalyst never even got. Open GL. Um, but w w we gotta get all over the place because you, you may be using open GL, even though you don't know you're using an open shell, you probably do, but you may not. Um, but for those who don't know, open GL is a very old standard, uh, for doing graphics programming. And kind of a cross-platform way. It was never a platform specific to anything worked on. Unixes worked on windows, worked on iOS 1.0, yes, James and it's been around forever and then apple deprecate it. We did a whole episode on it. I think I was just complaining about apple deprecating open GL, because that was very mean of them. And then Jane's, they did the most horrible thing. Not only did they deprecate it, they removed it. It's gone. Oh my God. Now [00:02:25] James: in this, if I go back in time, if you can refresh my memory, I remember this as at WWDC, they talked about this last year, two years ago, three years ago, but, um, what is it just from, at catalyst or is it from Macko S uh, as a whole and iOS as well? [00:02:44] Frank: Well, that's the rub. It's still works on iOS Edson. It's still exists. It's still deprecated, but it exists on iOS, current 14, 15, whatever we're up to. And Macko S 12, what are we up to? Uh, it's still there. Um, they kind of, can't remove it from Mac. So many Mac apps rely on it, but I think that the, we can get into why I think the technical reasons are why they flat out removed it, but it is. It's deprecated on both platforms and they deprecate it way more than two years ago. They deprecated it when they invented metal, the apple graphics library. So it's been deprecated since then. Okay. [00:03:26] James: Got it. Got it. This makes sense. And this means that what they didn't want to do was port that API to Mac catalyst. So the question that I have then was, did it use to show up and now it just doesn't show up anymore. It's like, nah, not fam squiggly. [00:03:42] Frank: Well, we're in this super awkward state where Mac supports it, but Mac catalyst doesn't, but a Mac catalyst app is a Mac. So hashtag what, um, you can do some kind of nasty hacks, uh, to get to the open GL library from a Mac catalyst app, but that apps never going to be allowed into the app store. So it's, it's one of those more like, uh, Um, living within the sandbox, you know, these are the API APIs that you're allowed to touch kind of universe because obviously they just can't remove open GL for a Mac Mac support software, going back to the 1990s, you know, it's just, you can't remove it. Um, but yeah. Here here. This is just conspiracy theory. We like to do Frank's conspiracy theories now. And then if you're new to the show, um, my guess is this. It's not so much that they didn't want to part the API it's that open GL has turned into a pixel shader base library or you're writing. Code as vertex and fragment shaders. And if you've never done this before, it's like a little C language that you embed into all your video games and all your graphics apps. Uh, even I circuit 3d has it. And unfortunately the dialect of that language is very specific to mobile devices. And it just translating that over to desktop class, a hardware, I think was something they just didn't want to deal with, especially since they had deprecated it so many years ago. Got [00:05:19] James: it. That makes sense. Now, how did you stumble on this little gem? [00:05:24] Frank: Oh, yeah, this is a dotnet six story. It turns out it was quite the adventure. Um, so we were talking the past few weeks. I've been pouring in my apps over and I love Scotia. I know that there's a new Maui graphics and people have been asking me what I think of it, to be honest, I haven't used always graphics very much so I don't have a strong opinion come, come back and we'll do a whole episode. I'm only graphics once I have a stronger opinion on it. Uh, but I love ski, a sharp DDO, ski, a sharp, [00:05:58] James: excuse me is very, very, very nice. It's very good. I do like. [00:06:02] Frank: Yeah. So ski a sharp, if you haven't used that, that's a cross-platform drawing library much like open GL. It's just not like backed by standards. It's a library. Google writes and skier is a library. Google writes and then ski a sharp is a nice.net binding to it. And forever. Um, if you were doing like a Xamarin forms or a Maui app, you might've used a class, uh, S K canvas. Yep. Pretty simple, but an SK canvas, you override a method or attached to an event and do your own drawing. Bingo. Bingo. Easiest way to do a custom drawn control, I think. Um, and it's a nice API, nothing wrong there. Problem is it's, it's still running on the CPU. It's maybe not running as fast as like a video game could run that kind of code. And the reason being it's not running really on the GPU, they'll technically, you know, there's rules operating systems can do whatever they want. It's running on the CPU for the most part. Okay. So have you used S K G L view? [00:07:12] James: No, I haven't, but you know, I recently saw a bunch of tweets of people, um, doing some games and some graphics and things like that. And I was curious if they were using, uh, and the 3d part. I was wondering if they were using. Um, just ski a sharp, or if they were using the built-in open GL view, that used to be part of examiner and forums. I don't know if it really made it over type of thing. I wasn't 110. [00:07:39] Frank: Yeah. Um, graphics is one of those things where you almost have too many options and gotten that, uh, for cross platform, you have a few, um, open GL is generally a 3d library. You can totally do 3d graphics with it, but in this case, the SKGL view was just using it for hardware, acceleration, um, nuts and bolts. Um, Hardware graphics code is like create a text or map, upload it to the GPU, upload a few triangles, tell it to draw the triangle. That's what a GPU likes. That's that's what makes the GPU happy? And so libraries like skiis sharp, just, uh, translate from lines, triangles, polygons into texture, maps, and triangles to make the GPU happy. Beautiful. Yeah. The beautiful part of that is you get fast rendering because the GPU is happy. Yeah. So much so that I switched, I circuit on iOS to use ski a sharp because their renderer is faster than apples. And that always kind of crushed my soul at all. That was crazy. Yeah. Yeah. I don't know why apple won't give us a hardware accelerated rendering library. It's really crazy. Like that's Apple's thing. Um, I think they just, I don't know. I don't know why they won't give us one. I don't have a conspiracy theory for them. [00:09:04] James: The like, everything else is fast. We just want this one to be fast, but not as fast as the. [00:09:09] Frank: I'm like, you know, if your code is slow, that's probably your fault. Did you read the manual? You can do. Um, you can see, I think it's more like a core animation. It's actually the closest analogy. Um, but core animation doesn't make it as simple as ski a sharp does anyway. So I'm making my Maui app over here, you know, having a good time. I'm using SK canvas view to get all my graphics going. I got like the library work and I got the scope work and I got, you know, all this stuff. And then I'm like, all right, now I want to go fast. And so I put in my, I switched my SK canvas view to be an S K G L view. And, and I get the weirdest error I've ever read in my life. So something cannot find handler for SKGL. Mm. Yeah. [00:10:04] James: Okay. Yes. That makes sense. Yep. Okay. [00:10:06] Frank: And I know want to explain why it makes sense, James? Well, okay. [00:10:09] James: So in the new Don and Maui architecture, there are these slim handlers that, uh, everything has an interface and all this other stuff, but the whole concept was there used to be this render concept, which was really heavy at all these life cycle events. I was like, really? It was, it was hard to. It was hard to customize yourself. So for example, or implement one yourself. So when custom libraries, or even to someone that wanted to modify a base control wanted to do that, it was a lot of coding to understand a lot of stuff, but the slim handlers kind of give things like a property bucket and sort of like a rendering loop, I think from my understanding of what to draw. And it just simplifies the process of. Of what the team has to implement on the diamond Maui side. It makes it easier for people to contribute and also easier to create your own handler. So if, for example, you know, sync, fusion, or Tellerik, or any of these other companies wanted to create their own, um, controls, they would create handlers for all of them. Pretty much. It'd be a little bit easier. And then you could easily override it kind of streamlined it. I don't know if I did a good job or not, but that's my understanding of. [00:11:17] Frank: Yeah. Yeah, I think he got it. Um, I would just add that the it architecturally, I think, I think of it like, um, the XAML views are kind of virtual views. Then there's this handler that's able to create the native views and the handler just keeps those two talking to each other and does whatever it needs to do to keep those two in sync with each other. I guess that's kind of how I think of it. Yeah. So I was lucky and I did see like, oh no, there's no hammer. And am I doing something wrong? Well, it turned out. I actually was doing something wrong in the beginning though. It didn't fix this problem. Uh, there's also a new thing to the Zimmerman forms world, the Maori world that I'm just not used to, which is, uh, sometimes when you import libraries that have controlled. Now you set up your service provider kind of thing or container thing, or in the beginning of the app, and you have to say like dot use, uh, something or another. And in this case, you have to say like that use skier. Yes. Use skier. [00:12:11] James: Yeah. So this is part of the new, um, it's like a, it's not a host builder, but it's a new builder pattern, very similar to asp.net core. Basically when you want to insert middleware, as we call it middleware, in fact, done in Maui has its own middleware. Um, in it. So you can override lifecycle events, all of the essential API APIs. There's a bunch of other things too, but for the, the laser web view, for example, there are these middleware insertion points. And this is nice as a library creator because it gives you access to the common dependency service that is used throughout the application and XYZ. So yeah, a bunch of cool [00:12:52] Frank: stuff. Well, w well, you know, it's really nice about it is like, as a library developer, sometimes we just need an initialize function. Bad objects or in programming and all that. But you know, sometimes you just really wish the user had to call an initialization function. So I always kind of look at it as well. Here's our way of like forcing people to call our initialization function. You have to add it to your services or something like that. Program, whatever, wherever they're putting it these days. Yeah. Uh, so yeah, uh, that puppy is not there. And so what do you do your file about? Great. So I went over to my gate, went over to the ski, a sharp project, and I said, why, why, why poor me? Um, SKGL view on Mac catalyst doesn't work. And I didn't really have much else to say. It's just like, it don't work. [00:13:48] James: Did you know, immediately what I would have done and I've done this before as I immediately run to get up and I start clicking through folders to see what is happening under the hood. Like I probably would have went into, I guess it would have been ski a sharp. Well, no, it would have been, it wouldn't have even been ski a sharp or would it have been in, down at Maui itself? [00:14:11] Frank: Uh, I would say it would have been in ski. A sharp. Yeah. [00:14:15] James: So what are we going to ski a sharpen. I want to dive into that implementation. Did you do that? [00:14:22] Frank: No. Um, because honestly it's a little hard to tell Matt catalysts from iOS because the API APIs are so identical. You don't really need many if, if things, you know, pound, if things. Yeah. And so you can't, you really have to dig into the project files. If a file is included, things have gotten more complicated these days. Unfortunately, they've gotten simpler, but the complexities moved into funny earth places. And so I didn't do that. I guess I was being kind of wimpy. You got me next time. I will. I promise. [00:14:57] James: But, but to your, to your points, he isn't the whole idea of Matt catalyst is that it is the same API. Plus some Mac specific things like the menu bars and whatnot that are supposed to be that isn't isn't that the idea that apple has sold us [00:15:17] Frank: it's exactly that I don't understand it, James. Here's what I really don't understand it. Okay. Going back to the conspiracy theory, you can have an iOS app that uses open GL that you can then sell and run on M one computers, Mac. Using Macko S but that same machine cannot compile a Mac catalyst app that uses open GL. Isn't it. It's very weird to me. And so, but I think it goes back to again, is because they have control of the M one. They were able to make sure that those, uh, pixel shaders from mobile would work on it where they can't make that same guarantee perhaps on desktop max or something like that. Again, conspiracy theory. I have no idea what's actually going on over there. It creates. [00:16:10] James: Yeah, I am, am looking specifically at a blog post or a stack overflow in which someone said in 2019 to three years ago, they said I have an objective C app. I tried to import it to Mac catalyst. And when I build it, it says open GL IES is deprecated and not available when building from our catalyst. And then one answer swift dev journal. Thanks. So if dev journal, please switch to metal. That's what they say. It says, please adopt a metal and go. Wow. Yeah. And I'll tell, I'll tell you this much, there's a bunch of stack overflow stuff in which people are not very happy. People are like, I do not want to, you know, and here's the thing too, right? If you think of, if you think of this is so funny, this is crazy. Okay. So think about this open GL ramp runs on Android. It runs on, it runs everywhere. The idea is you can run it everywhere. There's open TK as well. There's like, yeah. The funny part is like Volk, Vulcan replaces, open GL on Android. And what people are also doing is someone's created something called molten GL, and then molten VK, which is another cross. You know what I mean? Like someone's, cross-platform like, [00:17:22] Frank: I am two steps away from doing it. It wouldn't help in the ski a case because a ski is actually talking to open GL with a native level, but I've been kind of tempted to write like an open TK that actually talks metal instead of open GL. [00:17:36] James: Here we go. Someone metal angle open journal. Yes. To apple metal API translation transition late. C plus, plus we [00:17:45] Frank: should find that we should buy that and get, get SKG LVU back. I will put that into the bug. Nice. It's you know, that's, what's wonderful about API APIs. You can just re. Yeah, that's what I always say, but, okay. So we're getting a little bit ahead of ourselves. So I'm still back posting a bug. I'm like, where's my SKGL view in ski at sharp. Um, and, um, Matt, Matt, who I've never had to say his last name out loud, do you know? Great easy, Matt Liebowitz. Um, he was very quick to respond and it's like, yeah, open. Jail's not there, dude. And I'm like, what? But we, neither of us knew whether apple had removed it or if it was like just a dotnet six bug, you know, there's a few of those. And so I of course went over and then posted a dotnet six or a.net. Yeah, it's a dotnet six bug, uh, saying where's my. And fortunately very quickly. One of the, uh, Microsoft employees got back to me, Rolf. Oh, it's rough again. Wonderful roles. Uh, got back to me very quick and he's like, dude, it's gone. It's just gone, man. It's just kiss it. Goodbye. Apple deleted. It is gone from the Mac catalyst, get over it and I can't change. I just can't get over it. It's gone. They actually removed it. Wow. Yeah. So this was a little embarrassing. I basically opened two bugs that were basically Frank RTFM, but at the same time, like you can just see me go through the disbelief of what it's, what it's gone. What does that mean? Um, I will say it definitely makes a Maui a little trickier because now we have this SKGL view thing that only works on. Three of the four platforms, which is really embarrassing. Like come on three of the four, the five hour, however we're counting. It's rough, it's rough so that there are paths forward, but can we just commiserate for a moment on how terrible that is? [00:19:47] James: Pour one out. Um, okay. So I have the thinking about it. It's, it's a sad day because of this, this statement that you just said, which is, Hey, we have this thing that was cross-platform. It still is. If you did. Old-school Mac app, traditional non Mac catalyst app, but apple wants you to do the new hotness. Right. And I want it boggles my mind because now if, okay. So if I walked through the scenario, let's say, Matthew is like, all right, I'm going to solve this. I'm going to implement those APS in metal. Yeah. Instead I'm assuming seeing that there's an entire GitHub project that has to convert these, that there is not a one-to-one, it would be. I have to assume extremely problematic to try to do [00:20:35] Frank: anything. Yeah. I mean the most tempting nerd thing here is it's like 90%. One-to-one, it's the 10% that kills you. So they're so close that you can do it. Uh, now we should back up and say so yes, apple says, go use metal. And skier was ported to metal because they don't need much. They just need to be able to render textures and draw some triangles. And so they do have a metal version working and there is, um, a ski, a sharp binding to that and S K metal. The thing is, it's not cross-platform obviously. And so it's not like the SKG Elvia, which was cross-platform you can't like you have to change your XAML or you have to do code behind, or you have to do something fancy because that very specific platform. It's not exposed at the cross platform layer. This is what we're talking about with like your XAML views are kind of your cross-platform virtual view kind of thing. And it's the handlers that make a real view. There's not even a virtual version of the metal one because metal doesn't exist on Android metal doesn't exist on windows and it would be much harder to implement metal on Android. Implement metal on windows than let's say, like we were talking about opening, uh, implementing open GL using metal. Yeah. So there is a view out there. The sad thing is it's not cross-platform. Um, so w we're in a bit of a tough situation here. I mean, it's not the worst case you can do hacks to fix this and my Maui code. So in my Maui code, I use an SKGL view pretty much. On every platform except embarrassing embarrassingly, um, Mack catalyst, um, I had to like implement, implement my own gross custom view with its own gross custom handler and its own gross custom render and all that stuff. You know, it's code. I don't want to write, you know, I want to write cross-platform code, but thankfully all those levers are there. All the hatches are there. You can totally do it, but it's just frustrating that. Apple, my beloved apple is becoming the odd man out in the, uh, cross-platform area. Yeah. [00:22:51] James: I, and I feel like there's, like you said, there's really no good resolution to this problem because the thing that you were trying to get rid of, which was diversion of, of API APIs, you know, instead of having now, you know, you, if you were to try to solve it yourself, you're like, I'm going to create an interface. And I got to do it on this platform, this platform, and then that's a maintenance nightmare for. [00:23:14] Frank: Yeah, exactly. And so I think in this particular case though, we are a little bit lucky. So now I'm going to switch the podcast over to advocating something to Matt directly. No, I'm just kidding. But I think, um, It scares sharp is in this wonderful position that even though it is an open GL view, it's called SKGL view. You don't write any open GL code. That's not the point you write skier code. True. Yeah. So the GL part is really just an implementation detail. It's not important. All I'm trying to say is I want the fastest. I want the fast one. That's that's all, I'm really trying to convey to the library. I don't care what library they use to implement that. And so I just propose, maybe we should have something called like the ska GPU view where on iOS that would use metal. Uh, Android, maybe it will use Vulcan, you know, uh, and then windows, I could use GL I could use whatever windows that could use direct 2d, maybe in the future. I don't know what a skier actually wants to be run on, but I thought that it might be a good opportunity to raise our abstraction level a little bit and say, well, gel's not everywhere anymore. Let's just call it like a GPU view or something like that. [00:24:31] James: Yeah. I mean, and, and to your point, this would be the. Interface to end all interfaces, right? It's like, it's an abstraction across these things. And you said, you know, 90% is going to be similar. 10% is going to be hard of figuring out how to pull those things together. But this is the dream, of course. So to me, that sounds like the approach to do in my opinion, and pull it up yet. One more layer above when you've already abstracted stuff distracting. [00:25:02] Frank: And honestly, it's the magic of the name? You know, we're literally tr I, I I'm, I'm requesting that we changed the L and G L to P U so we can all just get on with our lives. So that on iOS that uses, because like I said, none of us are actually using that mode level part. It's, it's just not. It's just an implementation detail. So I think this isn't even a place where you would have a leaky abstraction, it's just abstraction abstractions, just naming things differently. And so I think we could totally pull it off, something like that. Um, and you know, the same thing could happen with, uh, Maui graphics. They might want like a fast version of it. Maybe there'll be a property on it called use the GPU or something like that. And they could switch their API APIs to do whatever is best to do fast rendering and things like that, too. So the good news is there are paths forward, but I just, I wanted to do this show, not exactly to complain, but to just be like, look my fears from a few months or years ago, weren't just fears. It actually came true. They actually removed the thing and now I'm actually having to deal with it. And that's actually annoying. Um, not the worst. Um, I have been learning my metal, but it's making my cross-platform game a little more. [00:26:19] James: Yeah, that's a not fun necessarily, but you know, As things progress. We about to get a dub dub DC right around the corner, right. When this podcast is coming out and I'm excited to see exactly what happens, maybe they're going to deprecate more. [00:26:35] Frank: Oh boy. You know, the, when you were saying it's like, I was just thinking to myself, the very last thing I want apple to do is introduce another drawing library. I know I said it's weird that they don't have a high-performance drawing library, but. No apple. No, no. We're all still dealing with metal. It's taken us a long time to catch up with metal. Please don't do that. But yeah, the DC in one week, something like that. [00:27:00] James: Yeah. Well, I think he's a beta summer. The week that this podcast comes out. [00:27:04] Frank: Right. Yeah. Okay. Well what happy WTF, TC everyone. Uh, you'll know if they introduce a new graphics API. If you see me screaming on Twitter, that's [00:27:15] James: how you'll know. But by the time that this come up, Frank has already done the hard work of creating this new open GPU view or whatever, and then apple will have deprecated metal. And now it's on to onto razor or plasma. Yeah. It's even, it's even more malt. It's like. I'll you minium. Yeah, I dunno. Uh, which is all metal. It's like, it's a sub variant of metal. It's like, now we're just going to start naming things. Specific metals instead of the high level metal, that'd be ridiculous and [00:27:45] Frank: amazing. Since we're already talking about, we could do a little, little preview show. I was joking. I remember a few episodes ago. Like I also don't want to see them introduce yet another neural network library, but I guess they fired someone big on the neural network teams. So now are not fired. They left and I'm like, oh no, does that mean there's going to be another neural network library? I wish they would. They're on libraries. I wish they would deprecate at least three of their neural network libraries. I can't believe that they would deprecate a remove open GL before their own trashy old network libraries that no one wants to use. Do what magic library do you think they'll introduce? [00:28:27] James: That's a great question. And that billing version three, like there's a really version [00:28:32] Frank: just to make your life harder. Whenever they do graphics or neural networks, they make my life harder. Whenever they do billing or anything sensor related, I think they make your life harder. Well, that's the [00:28:42] James: thing now, too, is that they're at the point where they're not really interested. Kits. There's a rewriting kits. You know what I mean? They're, they're looking at those old APIs and they're like, okay, how can we just swift to find them and make swift only API APIs? And that's the worry overall, but yeah, I'll be interested to see what, what happens. [00:29:01] Frank: I mean, I think he got burnt once. I think you're a little too worried about that. I think he just got burned. I mean, that being [00:29:08] James: said, the inept billing API does exist on mat catalyst. So they did port that. [00:29:16] Frank: Yeah. That's why I had my conspiracy theory. I, I imagine they even tried to put open geo on that catalyst because they probably recognized it'd be easier for everyone, but they probably ran into some actual problems that they didn't want us. [00:29:29] James: The fascinating part of it is when I think about Matt catalyst, is that one of their big targets. I think it was also for mobile games to come to desktop [00:29:41] Frank: hashtag, right? [00:29:43] James: Yeah. With like zero work. I mean, I guess, yeah. Um, maybe they're like, oh, everyone's using unity. So people are just checking check boxes and it doesn't matter, like unity, figure it out. [00:29:56] Frank: I mean, that is a thing. And they had gotten all the big engines to port their code. So you could very well be right about that. It's us weirdos writing our own engines using open GL. They got hit by this. Yeah. But you know, all my early iOS apps, my very first iOS app, um, Seattle bus tracker was an open GL render. You know, that's, that's where I got my start in iOS. And so I just find it a little, a little bit absurd. Yeah. Hmm. Hmm. But, but we have a path forward. Uh, I will make it through, this was just a news flash for everyone. Uh, save yourself two embarrassing bugs posted. It's gone. It's not coming back. We have to move on, I [00:30:42] James: guess. And I appreciate all the hard work that you're going to do over the next several months to make that brand new cross platform 3d view a reality, [00:30:51] Frank: Frank, oh, me too. It's going to be a busy summer. I got to do that. The apple beta's stepped up DC. It's also, [00:31:00] James: well, Lou will soon find out about debit DC and next week's episode. Dub dub DC. Probably. I assume. So Frank was probably, we were going to talk about, I'm not going to be there. Maybe I'll be there. I don't know if I'll be there. Mystery. Leave it on a cliff note. Who knows? Frank Wu [00:31:14] Frank: mysterious. So many question marks there. I love it though. That was a perfect 1944 serial ending. [00:31:21] James: Perfect. All right. Well, let us know what you think about open GL being removed forever grant. They told us, and Frank could have figured it out three years ago, but he didn't know, but is there now? That's all the matters. Um, Yeah, let us know if you're interested in this brand new cross-platform 3d. I had a lot of people ask me about cross-platform 3d stuff, so I'm sure people are interested. Definitely let us know by writing us at merge conflict out of founders, contact button. Definitely love to hear from all y'all, but that's really going to do it for this week. Nice. Short and sweet. Prepare for dub dub, dub, dub week, everybody. And we'll see you next time. I'm James mountain magnet and I'm Frank Krueger. Thanks for the [00:31:58] Frank: piece.