Writing to the Metal (API)

Writing to the Metal

Metal — throw the horns! — is iOS's new low-overhead, high-performance API for writing to the Apple A7 graphics processing unit (GPU). But given Apple's other graphical tools, from SpriteKit to SceneKit, where does Metal fit in, and what does it mean for developers and for the future of apps and games? Guy English, writing on Kickingbear:

Here's the run down. SpriteKit (or Cocos2D) will serve most of your needs for casual games. SceneKit (now on iOS too) will serve many needs, especially for top down games where culling isn't a huge bottle neck. Failing that OpenGL will solve 99% of your rendering needs. If you're reading this article and hope to use it to convince a manager to go with Metal as your rendering API you'll be disappointed.

Last fall it was all about desktop-class processors. Now it's about console-quality graphics engines: Frost Bite and Unreal and Unity and the like. And as good as Metal will be on current iPhones and iPads, I can't wait to see what developers do with it on presumed Apple A8 devices later this year, including the iPhone 6 and, who knows, eventually even a souped-up Apple TV?

Read the rest of Guy's article to see when and where he thinks Metal will be most interesting.

Have something to say about this story? Leave a comment! Need help with something else? Ask in our forums!

Rene Ritchie

EiC of iMore, EP of Mobile Nations, Apple analyst, co-host of Debug, Iterate, Vector, Review, and MacBreak Weekly podcasts. Cook, grappler, photon wrangler. Follow him on Twitter and Google+.

More Posts



← Previously

Best apps of the week: VVVVVV, Angry Birds Epic, Fitbay, and more!

Next up →

Talking iOS keyboards with SwiftKey's Joe Braidwood

Reader comments

Writing to the Metal (API)


Rene, GPU stands for graphics processing unit. Your expansion of the acronym isn't a common replacement either. This is the result of a 5 second search, though common knowledge to me. It sounds awfully silly how it is now.

We try to help people with their phones, even when they're brand new to their phones, even when they're brand new to the internet and go off topic on post comments :) I'll make no apologies for that. What I will do is challenge you to be productive, to contribute, to help make the site more of what you want to see. You don't like basic how to articles, well here's one on low-level GPU API. Great, right? Contribute so we get more of them!

What do you think about metal?

Thanks, I had API on the brain and typed it out wrong. Fixed.

While corrections are always welcome, some actual input on the subject at hand would be great to see as well. Have you had a chance to look at Metal yet? Appeal to you at all?

Way to right the ship el capitan. Metal sounds intriguing, it's disappointing to hear that it may be brushed aside by developers in favor of older API's.

Apple always has great demos (Infinity Blade Dungeons anyone??) and they always get me excited. I am really hoping this is a long play toward an Apple TV focus.

Now get on with releasing a first party MFi controller so that 3rd parties can see how its done.

Hey Rene! No problem--mistakes happen. I probably make more than most people. Thanks for the correction!

"OpenGL will solve 99% of your rendering needs."

So Metal is just a 1% solution. At the moment. But Guy also says this:

"Nothing is easier to write hundreds of lines of code in to end up with a black screen than OpenGL."

Trust me. Writing a ton of code, carefully checking it, making sure it's right, then running it to get absolutely nothing? It's one of the worst feelings you can have as a developer. Because if nothing is visible, how do you know where to start looking for the problem? Is there just one little problem somewhere, or 10, or is your entire architecture wrong?

And no, you can't always write a little bit of code, test it, then write a little bit more, then continue testing iteratively in small easily-checked steps. Sometimes you simply need to write a bunch of code, cross your fingers, and hope it runs. And, from what I've heard, OpenGL is like that. Yuck.

But Guy makes it sound like Metal does make it much easier to "set the stage" for heavy-duty massively-parallel GPU computations. Especially if you are starting with a brand-new app and don't need to massage an existing codebase into working on new(er) A7 hardware. If Metal really does eliminate some or all of the huge hurdles in getting OpenGL to work, then it will certainly help developers to write GPU-intensive apps and games.

This year's WWDC also brought Swift, which makes iOS / OS X programming easier, less error-prone, and more secure. And Xcode 6, with Playgrounds, is an incredibly good tool for learning Swift. Sounds like Metal fits right into that "easier and better" concept. And over time, maybe Metal will become way more than a 1% solution.

As intrigued as Guy was about the GPU setup in the MacPro, I am surprised he offered no speculation about how Metal may work there, or how the combination may (or may not) filter down to other product lines.

Sent from the iMore App