Apple announces new graphics API: Metal

All the OpenGL-related Core Graphics stuff in Objective-C was really just C dressed up in structs to look and act (somewhat) like objects. They’re trying to make it so working with the graphics at a lower level isn’t this entirely separate experience from the rest of Cocoa/Cocoa Touch APIs. None of this stuff was intuitive before. You had to learn Objective-C, then learn the Cocoa/Cocoa Touch APIs, and then learn the Core Graphics stuff, which also depended on having at least a decent amount of experience with C. It was a pain in the butt. Apple is trying to retain current developers and draw in new ones. That’s their primary goal here.

You wouldn’t have to go the DX route of low-level interfaces as C++. You could stick to a C interface. I don’t see any choices that would be “removed” by going C++ though. (Not that I would care one way or the other about this bit).

Well not so much “removed” as just made more awkward.

Cas :slight_smile:

People said the same thing about Flash.

That was a good call.

Apple never supported Flash in the first place. I highly doubt OpenGL support will get dropped anytime soon, as that would mean breaking almost all existing games.

most ? currently that would be … all, right ?

[quote=“Orangy Tang,post:44,topic:49208”]
Nice, pithy response, but it lacks rational analysis. Do you know why Apple “dropped” Flash? Because it ran like junk on their devices and Adobe never made it right. Heck, it took them 10 years–10 years!–to fully implement their Creative Suite, used heavily on Macs by design professionals, natively in Cocoa. You can, perhaps, forgive Apple for feeling like this particular 3rd party was taking them for granted and giving them the run-around. It’s not Apple’s fault that Adobe only claimed to see the light once the iPhone dropped, mobile suddenly boomed, and it actually mattered to lose Apple’s support. Apple also saw HTML5 and hardware acceleration for browser graphics coming down the pipeline, and knew that Flash was soon going to be a thing of the past anyway. Worth noting, however, is that the “drop” only applied to iOS and the fact that Apple would no longer pre-bundle Flash in OSX. You can still download Flash on your own, or if you use Chrome, it will already be integrated into the browser for you. Not quite sure why anybody would want to proactively support Flash these days, though, unless they made Flash games or something like that. It’s basically dead in the water.

Compare that to the OpenGL situation: This only applies to iOS and accessing the power of the A7 chip. They created an API which they’ve claimed allows developers to eke out better performance, more easily, from it. You can still use OpenGL, as usual, if you want. Why? Because Swift uses the same compiler as Objective-C, which means you can run your Objective-C and C code alongside it. Apple’s contention is that you generally aren’t going to want to, though, because Swift is not only more elegant to write, but also faster/more efficient than Objective-C, and you won’t have to be well-versed in C just to manipulate the low-level graphics capabilities of the device.

You have to understand: if, once iOS8 comes out, Apple said, “Okay, OpenGL is now gone,” that would effectively kill off a huge number of games in the App Store, needlessly. With the iOS update adoption rate being what it is, those games would enter the dustbin largely overnight, and Apple would lose a huge source of revenue. They have no reason to do this. They aren’t going to do this. The paranoia is simply not justified.

The reality is that working with OpenGL in Objective-C was a big pain for most developers. It was designed to feel “integrated” into the experience through the use of C structs, but it just felt tacked-on and, well, wrong. Swift and Metal are not nefarious. They represent a real attempt, on Apple’s part, to finally integrate all these aspects of iOS development, to make them feel like parts of a single, consistent process.

(I kind of hate how, as someone who also writes Java and Ruby code, I have to come off like a huge Apple fanboy here. :D)

Having a better designed API is always a sucky excuse if it means changing everything for developers to become more locked into some platform.
Why didn’t they just implement their Metal stuff within OpenGL?

Because in terms of current iOS development, implementing this stuff in OpenGL means implementing it in C. Apple is trying to move away from C, not chain itself to C even further.

I don’t get all the interest in metal outside of Apple devs. The only thing I find shocking about it is: What the fuck took them so long? This should have been in place before they shipped the first prototype to outside devs. Low level access is the rule of the game for embedded device development.

That doesn’t even make sense. It would be purpose defeating.

Dev lock-in? WTF? How so? All dev platforms have platform specific APIs. Big deal.

tbh I don’t know any details about Metal; I was sort of referencing Carmack who stated that Mantle could have been done as OpenGL extensions and on surface it looked like Metal was going for something similar as Mantle.

And yes, all platforms have specific APIs, and that is a big deal as that was an important reason for Java to exist in the first place.
Maybe Apple intends to make Metal an open standard, but realistically that won’t really make a difference. It’s not like Google or Microsoft will be in any hurry to support it.

The big game engines like UE and Unity will probably support it if Metal becomes successful, but I can’t imagine many developers being overjoyed with the idea of having to deal with yet another API that does the same thing.

They don’t care. They’re with the program of having a low-level versioned graphics API.

Those that aren’t interested don’t need to bother. Those that are can’t do the same thing with OpenGL. Where’s the problem? Outside of embedded devices it would be great if OpenGL died. I don’t care if it were replaced with a newer non-backward compat low-level (versioned) thing called OpenGL. Toss a backward compat version of top of that low level and everybody’s happy.

Apple already demo’d it being used with Crytek and Unity engines.

Developers work with the best tools for the job that are available at the time. Developers don’t pitch a fit just because there’s a new API, as long as the new API means they can do better work.

And the bottom line is, if you still want to use OpenGL as is, you’ll be able to do that on iOS. It’s been said again and again: Apple is not getting rid of OpenGL. What they’re trying to do, over the long-term, is offer a unified toolset for app development. Currently, developing with OpenGL is a fractured process, in which you’re forced to bridge Objective-C and C. Apple wants to provide a way for developers to circumvent that mess, while getting the most out of the A7 chip as possible.

My subtle prediction is that they will a) let OpenGL ES support on iOS (and possibly MacOS) stagnate and then b) quietly deprecate it completely a couple of years down the line. They will then provide OpenGL drivers as an optionally downloadable framework for end-users to run “legacy” applications. In the meantime developers, whilst not actually locked-in, begin to feel a little bit of drag when trying to swim slightly against the currents of Apple’s whimsies, subtly backed by increasing numbers of whining customers.

They’ve done this before… they’ll do it again.

Cas :slight_smile:

Yes, Game Engine Vendors LOVE all these new APIs mushrooming up at the moment. from their point of view there can’t be enough of them. The more fractured the graphics world becomes, the more people are dependent on the game engine vendors to bridge the divides.

Update to date (with respect to what hardware looks like) graphics APIs make your life easier…not harder. They also have a much lower learning curve.

I’d bet money on it. This is what people don’t understand about Apple, they’ve been doing this for the last decade. Their goal is to own everything connected to apple. The more locked in you are, the more power they have to strong arm people into using their overpriced machines.

I mean hell, take iOS development. There is absolutely no reason why you have to have a Mac to develop on iOS other than they just want it that way. I’m sure that an iOS IDE could exist on windows, but they can’t sell those pretty $3000 Macbooks to Android devs who want to port over.

(EDIT: and the addition of Metal will make it more justified to make iOS development mac-only, hmm?) :wink:

Doesn’t make sense. The Metal API only applies to the A7 chips in Apple’s newest mobile devices. Ditching OpenGL would affect the OSX end of things, too.