O'Reilly logo

iOS 9 Game Development Essentials by Chuck Gaffney

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The basic Metal object/code structure

To finish off our talk about Apple Metal, let's look at an overview of the API's object and code structuring. We already briefly saw some shader code in the Metal Shading Language, so let's see how we can work with this API in our projects.

Objects

Purpose

Device

Reference to the GPU

Command queue

Serial sequence of command buffers

Command buffer

Contains GPU hardware commands

Command encoder

Translates API commands to GPU hardware commands

State

Framebuffer configuration, depth, samplers, blend, and so on

Code

Shaders (vertex, fragment, geometry, and tessellation)

Resources

Textures and Data Buffer Objects (vertices, constants, and so on)

The preceding table represents the various types of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required