Jacob’s Tech Tavern

Jacob’s Tech Tavern

Through the Ages: Apple Animation APIs

Try out real code from NeXTSTEP to Mac OS X to SwiftUI

Jacob Bartlett's avatar
Jacob Bartlett
Nov 21, 2023

I recently stumbled upon John Siracusa’s legendary Mac OS X reviews for the first time.

If you’re not in the loop, these were astonishingly detailed technical reviews of Apple’s major Mac OS X releases between 1999 and 2014. According to Ars Technica, where these were published, “a new OS X release started with Steve Jobs and ended with John Siracusa.” I voraciously delved into these reviews with a handy reading list as my tour guide.

What I found most fascinating — and what really inspired me to write this — was the piece on Core Animation from 2007. As a Swift baby, who barely remembers the Grand Renaming of Swift 3.0, Core Animation feels as fundamental as iOS itself, underpinning both UIKit and SwiftUI.

Learning of the existence of a world before Core Animation is like finding out that Santa isn’t real. What? You mean the pixels didn’t move around my screen by magic? It’s like learning that before the fire, we cooked food by rearranging its atoms by hand. Which, incidentally, is more or less what you had to do with pixels on first-generation GUIs.

In this article, I’m going to guide you on a journey through time to discover what was available to the Apple devs of each era, explain the problems solved by each successive generation of animation APIs, and even give you the opportunity to play with some real-life old-school animation code in this GitHub project.

Timeline

1989 — NeXTSTEP Generation: Display PostScript

2001 — Apple’s Renaissance: Quartz & OpenGL

2007 — The Modern Era: Core Animation

2014 — The Performance Age: Metal

2019 — The Declarative Revolution: SwiftUI


1989 — NeXTSTEP Generation: Display PostScript

Let’s first jump way back in history to understand the context of today’s Apple software. After being ousted from Apple in 1985, Steve Jobs founded NeXT, a rival computer company.

NeXT was hugely influential in object-oriented programming and graphical user interfaces and was eventually acquired by Apple. Their own NeXTSTEP operating system was merged with the Mac OS to become Mac OS X.

I didn’t want to shell out for a NeXTcube — or go down a huge rabbit hole to emulate 40-year-old hardware — therefore this section will show some code, but we won’t be able to run it. For everything else, there are real-life examples in the GitHub project that you can try out in Xcode!

The NeXTSTEP OS used a computer graphics engine developed by Adobe called Display PostScript. This introduced substantial advances over previous-generation display layers: it allowed text and graphics to be treated the same and introduced device-agnosticism through its higher-level API and page description language.

To give you a flavour of what this was like to work with, I bring you a charming snippet from the NeXT Computer Programming Manual:

# In the Application Kit, rectangles are specified as C structures of type NXRect. Since all coordinate values must be specified by floating-point numbers, it defines NXCoord as a float:

typedef float   NXCoord;

# A pair of NXCoord variables--one for the x coordinate and one for the y coordinate--designate a point:

typedef struct _NXPoint {
    NXCoord     x;
    NXCoord     y;
} NXPoint;

# A pair of NXCoord variables also designate the size of a rectangle:

typedef struct _NXSize {
    NXCoord     width;
    NXCoord     height;
} NXSize;

# The NeXT header file graphics.h (in the appkit subdirectory) combines NXPoint and NXSize structures to define the rectangle itself:

typedef struct _NXRect {
    NXPoint     origin;
    NXSize      size;
} NXRect;
Figure 4–7. Rectangle (courtesy of the NeXT Computer Programming Manual)

The manual also offers some simple code examples and PostScript APIs, such as…

Instantiating a rectangle:

NXRect  rect = {{10.0, 10.0}, {50.0, 50.0}};

Highlighting a rectangle on-screen:

NXHighlightRect(&rect);

Checking whether two rectangles overlap:

BOOL overlap;
overlap = NXIntersectRect(&rect1, &rect2);

Creating a new rectangle for the intersection of overlapping rectangles:

NXRect  *smallrect;
smallrect = NXIntersectionRect(&rect1, &rect2);

Creating a new rectangle for the union of both rectangles, i.e., the rectangle containing both:

NXRect  *bigrect;
bigrect = NXUnionRect(&rect1, &rect2);
Figure 4–8. Union and Intersection of Rectangles (courtesy of the NeXT Computer Programming Manual)

While these commands were exceptionally low-level compared to what we are used to, they could compose together to create some pretty clean-looking systems, considering the constraints of 1989 hardware.

The NeXT desktop, courtesy of Wikipedia

While code archaeology is good fun, I am starting to get dust in my butterfly keyboard. Before I cannot type, I will move on to some APIs that you can run on today’s hardware!

2001 — Apple’s Renaissance: Quartz & OpenGL

In 1996, Apple Computer acquired NeXT, Steve Jobs, and the NeXTSTEP operating system. This was the foundation for the original Mac OS X released in 2001.

Mac OS X (pronounced OS-ten) instituted the fundamental building blocks for Apple’s future, and itself was a revolution of OS design that we take for granted today — all the way from its signature look-and-feel (Aqua) down to the kernel itself (Darwin).

Mac OS X (10.0) architecture

The graphics layer of our O.G. OS has three components:

  • Quartz for low-level display and rendering, including Windows.

  • OpenGL for animation and 3D rendering.

  • Quicktime for audio and video (i.e., very out of scope).

Let’s go over Quartz and OpenGL in some detail to get a feel for what OS X programming was like back in 2001.

Quartz

Quartz, nowadays known more commonly as Core Graphics, forms the underlying display layer for Aqua, the design language at the top of our architecture diagram — a language that introduced the familiar Apple UX we know and love today. The Dock’s mouseover-to-expand and its famous genie animation when opening and closing a window were created using Quartz.

Mac OS X look and feel (from Wikipedia)

Quartz and Display PostScript were both “third generation” display layers — meaning they maintained information about the shapes drawn to the screen. Third-generation layers were also vector-aware, which helped power the easy transformation of on-screen objects. Quartz used Adobe’s PDF instead of PostScript as the underlying graphics representation language. This is a more advanced, open, standard which brought improvements across the board to colors, fonts, and interactivity.

Let’s draw something!

I’ll keep things simple with a basic Objective-C app — sorry to my Swift comrades, but that language isn’t released for another 13 years!

First, I create a header file for ATTAQuartzView.h A.K.A. my “Animation Through The Ages Quartz View” — name-spacing is important in Objective-C!

#import <Cocoa/Cocoa.h>

@interface ATTAQuartzView : NSView

@end

Then I implement the drawing logic in ATTAQuartzView.m.

#import "ATTAQuartzView.h"

@implementation ATTAQuartzView

- (void)drawRect:(NSRect)dirtyRect {
    [super drawRect:dirtyRect];
    CGContextRef context = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; 
    CGContextSetRGBFillColor(context, 1.0, 0.85, 0.35, 1.0);
    CGContextFillRect(context, CGRectMake(150, 150, 200, 200));
}

@end

I create a Core Graphics context, set a fill color, and fill a rectangle with this color.

Finally, to make life simple, I instantiate this view in the View Controller’s viewDidLoad method:

- (void)viewDidLoad {
    [super viewDidLoad];
    ATTAQuartzView *quartzView = [[ATTAQuartzView alloc] initWithFrame:NSMakeRect(0, 0, 400, 300)];
    [self.view addSubview:quartzView];
}

The result? A glorious golden square rendered to the window.

While NSViewController didn't really exist until Mac OS X Leopard (2007), I'm compromising to keep things simple with our Xcode project template.

In reality, developers would create and manage NSView instances directly, handling loading and transitions themselves.

Animating with Quartz

When you want to animate with Quartz, your options are rather limited.

Coming from Core Animation and SwiftUI, it may be a little more literal than you might be used to. We’re going to run some code on an NSTimer to directly update the frame of our on-screen shape.

First, we update ATTAQuartzView.h header file with a new side property:

#import <Cocoa/Cocoa.h> 

@interface ATTAQuartzView : NSView

@property (nonatomic, assign) CGFloat side;

@end

And then, we can update our ATTAQuartzView.m implementation file to…

…set up a timer to modulate the rectangle’s side length over time:

@implementation ATTAQuartzView
{
    NSTimer *_timer;
    CGFloat _increment;
}

- (instancetype)initWithFrame:(NSRect)frameRect {
    self = [super initWithFrame:frameRect];
    if (self) {
        _side = 50.0;
        _increment = 3.0;
        _timer = [NSTimer scheduledTimerWithTimeInterval:1.0/60.0 target:self selector:@selector(tick:) userInfo:nil repeats:YES];
    }
    return self;
}

- (void)tick:(NSTimer *)timer {
    self.side += _increment;
    if (self.side > 200.0 || self.side < 10.0) {
        _increment *= -1.0;
    }
    [self setNeedsDisplay:YES];
}

//...

@end

...and redraw the shape based on this updated side length:

@implementation ATTAQuartzView

//...

- (void)drawRect:(NSRect)dirtyRect {
    [super drawRect:dirtyRect];
    CGContextRef context = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
    CGContextSetRGBFillColor(context, 1.0, 0.85, 0.35, 1.0);
    CGContextFillRect(context, CGRectMake(250 - self.side / 2.0,
                                          200 - self.side / 2.0,
                                          self.side,
                                          self.side)
                      );
}

@end

Our efforts are paying dividends in the form of a beautifully animated square.

The API is pretty straightforward when we’re just drawing or resizing a basic vector shape, but you can imagine how complex things could become if you wanted to move multiple items on-screen, deal with layering and opacity, or implement smoother animation timing curves.

OpenGL

OpenGL constituted the second pillar of the OS X graphics story. OpenGL is an open-source and cross-platform API for rendering vector graphics in 2D and 3D. It utilised hardware acceleration, which is a fancy way of saying it offloaded work to the GPU to render graphics. This made it the place to go for high-performance rendering on OS X (at least until 2002, when Quartz Extreme freed Quartz from the CPU).

OpenGL’s smooth 2D animation capabilities and lightning-fast GPU rendering allowed turn-of-the-century developers to create high-performance apps on hardware that would embarrass your grandmother. OpenGL used numerous modern optimisation techniques such as double-buffering — this displayed one frame while drawing the next, ensuring a smooth frame rate.

I’ve set up a simple Objective-C Mac App project in Xcode, which you’re welcome to follow along with! This 2004 tutorial from Apple proved invaluable in learning the ropes — and once again demonstrates how they were untouchable regarding documentation.

Creating our OpenGL drawing

First, import OpenGL to Frameworks, Libraries, and Embedded Content in the Xcode General project settings:

Importing the OpenGL framework

Now, we can make a simple Obj-C header file, ATTAOpenGLView.h:

#import <Cocoa/Cocoa.h> 

@interface ATTAOpenGLView : NSOpenGLView

- (void) drawRect: (NSRect) bounds;

@end

I hit a build warning before I even implemented anything:

@interface MyOpenGLView : NSOpenGLView
“NSOpenGLView is deprecated: first deprecated in macOS 10.14. Please use MTKView instead.”

OpenGL was actually deprecated in MacOS Mojave, in favour of Metal, which we’ll come to later on. If you want to silence this warning, and the many more that will follow, throw up a -DGL_SILENCE_DEPRECATION compiler flag in the Xcode project build settings.

Next, we write our implementation file, ATTAOpenGLView.m:

#include <OpenGL/gl.h>
#import "ATTAOpenGLView.h"

@implementation ATTAOpenGLView

- (void) drawRect : (NSRect) bounds
{
    glClearColor(0, 0, 0, 0);
    glClear(GL_COLOR_BUFFER_BIT);
    drawAnObject();
    glFlush();
}

static void drawAnObject(void)
{
    glColor3f(0.5f, 0.8f, 0.1f);
    glBegin(GL_TRIANGLES);
    { 
        glVertex3f( -0.5, -0.5, 0.0);
        glVertex3f(  0.0,  0.5, 0.0);
        glVertex3f(  0.5, -0.5, 0.0);
    }
    glEnd();
}

@end

The drawRect(bounds:) method sets black as the background color, runs our drawing routine, and then calls glFlush() to send drawing instructions to the GPU.

drawAnObject() sets a green RGB color and draws out the vertices of a triangle. glBegin(GL_TRIANGLES) tells OpenGL that the vertices in the block should be grouped into threes and drawn on-screen as triangles. Since we give three vertices, that renders a solitary triangle.

Finally, to display the view on-screen, I set the main View Controller’s view as a new instance of ATTAOpenGLView as we did when looking at Quartz.

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.view = [[ATTAOpenGLView alloc] init];
}

Finally, we are blessed with a beautiful green triangle drawn on-screen.

Illuminati confirmed?

Let’s add some animation!

Like before, we could use an NSTimer to trigger our re-drawing logic, but a more performant approach is to use CVDisplayLink to sync updates up with your screen’s refresh rate, so we don’t waste clock cycles rendering frames that never appear on our screen.

You know what that means? It’s time for some more boilerplate! 😃

#include <OpenGL/gl.h>
#import <CoreVideo/CVDisplayLink.h>
#import "ATTAOpenGLView.h"

static CVReturn ATTADisplayLinkCallback(
    CVDisplayLinkRef displayLink,
    const CVTimeStamp* now,
    const CVTimeStamp* outputTime,
    CVOptionFlags flagsIn,
    CVOptionFlags* flagsOut,
    void* displayLinkContext)
{
    @autoreleasepool {
        ATTAOpenGLView* view = (__bridge ATTAOpenGLView*)displayLinkContext;
        [view performSelectorOnMainThread:@selector(markForRedisplay) withObject:nil waitUntilDone:NO];
        return kCVReturnSuccess;
    }
}

@implementation ATTAOpenGLView

- (void)markForRedisplay {
    [self setNeedsDisplay:YES];
}

- (instancetype)initWithFrame:(NSRect)frame {
    self = [super initWithFrame:frame];
    
    GLint swapInterval = 1;
    [[self openGLContext] setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval];

    rotation = 0.0f;
    
    CVDisplayLinkCreateWithActiveCGDisplays(&displayLink);
    CVDisplayLinkSetOutputCallback(displayLink, &ATTADisplayLinkCallback, (__bridge void*)self);
    CVDisplayLinkStart(displayLink);
    
    return self;
}

- (void) dealloc {
    CVDisplayLinkStop(displayLink);
    CVDisplayLinkRelease(displayLink);
}

// ... our actual drawing code is all the way down here ...

@end

Long story short, upon initialisation, we are doing two things:

  1. We set the “swap interval” on the NSOpenGLView to 1. This tells OpenGL to sync up its buffer swaps — i.e., its frame rate — with your screen’s refresh rate (a.k.a. its “v-sync” rate). Jargon aside, we tell OpenGL how many frames per second to calculate.

  2. We also tell CoreVideo to send a callback each time our screen’s display refreshes. This callback executes a selector on the main thread (GCD isn’t invented for another eight years!), which marks the view for re-drawing. This ensures that the actual drawing to the screen happens at the correct time to avoid a screen refresh mid-calculation (this can cause a visual effect called tearing).

The rest of our implementation isn’t too hard. Each time setNeedsDisplay is set, the drawRect method is called, we update our rotation, and upgrade drawAnObject with some snazzy rotation logic:

@implementation ATTAOpenGLView

// ... CVDisplayLink boilerplate ... 

- (void) drawRect:(NSRect)dirtyRect {
    [super drawRect:dirtyRect];
    rotation += 1.0f;
    glClearColor(0, 0, 0, 0);
    glClear(GL_COLOR_BUFFER_BIT);
    drawAnObject(rotation);
    glFlush();
}

static void drawAnObject(float rotation)
{
    glPushMatrix();
    glRotatef(rotation, 0.33333333333f, 1.0f, 0.5f);
    glColor3f(0.5f, 0.8f, 0.1f);
    glBegin(GL_TRIANGLES);
    {
        glVertex3f( -0.5, -0.5, 0.0);
        glVertex3f(  0.0,  0.5, 0.0);
        glVertex3f(  0.5, -0.5, 0.0);
    }
    glEnd();
    glPopMatrix();
}

@end 

The big difference here is we’ve added glRotatef, which gives a very cool 90s-chic rotation along a 3D axis. Finally, glPushMatrix and glPopMatrix add and remove the transformation matrix to and from a stack — essentially ring-fencing the enclosed transformations so that nothing else on-screen is affected. Not exactly important in this one-shape case, but good manners.

We’re rewarded for our efforts with a high-tech 3D triangle.

Illuminati confirmed.

2007 — The Modern Era: Core Animation

Let’s flash forward to 2007.

Image from giphy

The iPhone had just released.

There is no App Store for another year.

Apple platform developers can only build for Mac OS X, but they have a problem.

Animation is hard work.

You saw how much ceremony was required to animate basic shapes in Quartz and OpenGL. Consider how tough it’d be for an indie dev to implement animations on the same level as the Dock genie.

In 2007, Mac OS X Leopard included a shiny new framework that changed everything: Core Animation.

Suddenly, Apple platform devs had a declarative framework to describe the end state they wanted, and the system would draw each frame to get to that state.

The framework would optimise the path to that state, utilising the tightly-integrated Mac hardware — including the GPU — to ensure a smooth transition. Core Animation’s sensible built-in defaults, in a single swoop, created a consistency of look-and-feel across all Apple platform apps.

Core Animation, sometimes called QuartzCore, worked using lightweight layers with several properties — including frame, border, filters, shadow, opacity, and mask — which could be animated virtually without effort. Core Animation also allowed video, Quartz, and OpenGL to operate together in a unified manner — everything graphical suddenly “just worked.”

This heralds the beginning of “The Modern Era” because Core Animation underpins much of the UI we write today, including AppKit, UIKit, and SwiftUI.

Developing with Core Animation

Now that we’re working directly with modern Core Animation layers, it’s pretty easy to work with the basic Xcode templates — we can even draw our CALayers in the default NSViewController from our project template. Follow along here, or clone the sample code yourself.

At the top of the ViewController.m, make sure to import Core Animation. On Mac and iOS, Core Animation is bundled with Core Image in a single framework called QuartzCore.

#import <QuartzCore/QuartzCore.h>

Now, everything we’re doing will sit in the viewDidLoad method of our view controller. As I mentioned before, NSView predates Core Animation by a lot. Therefore, we need to opt-in to make an NSView layer-backed by calling:

[self.view setWantsLayer:YES];

You might not recognise this if you’re more familiar with UIViewController, which is CALayer-backed by default.

Let’s go straight into it!

First, let’s draw our original CALayer — a simple circle.

// Circle shape layer
CAShapeLayer *circleLayer = [CAShapeLayer layer];
circleLayer.frame = CGRectMake(self.view.bounds.size.width/2, self.view.bounds.size.height/2, 150, 150);
circleLayer.cornerRadius = 75;
circleLayer.backgroundColor = [NSColor whiteColor].CGColor;
[self.view.layer addSublayer:circleLayer];
Our circular shape layer

Let’s add a simple scale animation so the circle grows and shrinks. We aren’t in previous generations of graphics APIs. In The Modern Era, you can specify your layer's start and end states, and Core Animation automatically calculates the frames required!

// Scale animation
CABasicAnimation *scaleAnimation = [CABasicAnimation animationWithKeyPath:@"transform.scale"];
scaleAnimation.fromValue = @1.0;
scaleAnimation.toValue = @1.5;
scaleAnimation.duration = 1.0;
scaleAnimation.autoreverses = YES;
scaleAnimation.repeatCount = HUGE_VALF;
[circleLayer addAnimation:scaleAnimation forKey:@"scaleAnimation"];

Frankly, I don’t think there’s much to explain here. We tell Core Animation what type of animation we want to create using [CABasicAnimation animationWithKeyPath:@”transform.scale”].

We set the initial and end state. We ask Core Animation to auto-reverse the animation — that is, go from start to end and back again. We tell it to repeat HUGE_VALF times.

HUGE_VALF is admittedly a little bit of cruft left over from the the heyday of C-based languages. It literally means “a huge float value.” For all intents and purposes, infinity.

Scale animation

Next, we add a rotation animation along the y-axis. Combined with the previous scale animation, this gives a 3D effect of the circle moving towards you on the screen, a bit like a flipped coin.

// Rotation animation
CABasicAnimation *circleYRotation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.y"];
circleYRotation.toValue = [NSNumber numberWithFloat:M_PI * 2.0];
circleYRotation.duration = 4.0;
circleYRotation.repeatCount = HUGE_VALF;
[circleLayer addAnimation:circleYRotation forKey:@"rotationAnimation"];
Rotation + scale animation

In Core Animation, you can apply both these animations to the layer, and it composes them together seamlessly.

Next, we can add a sublayer to give a nice gradient effect and pin it to the bounds of the shape layer. Since it’s a sublayer, all the animations applied to the parent shape layer will seamlessly apply.

// Gradient sublayer
CAGradientLayer *gradientLayer = [CAGradientLayer layer];
gradientLayer.frame = circleLayer.bounds;
gradientLayer.colors = @[(__bridge id)[NSColor redColor].CGColor, (__bridge id)[NSColor yellowColor].CGColor];
gradientLayer.startPoint = CGPointMake(0, 0.5);
gradientLayer.endPoint = CGPointMake(1, 0.5);
gradientLayer.cornerRadius = circleLayer.cornerRadius;
[circleLayer addSublayer:gradientLayer];
Gradient layer + rotation + scale

Finally, we can add another animation to modulate the gradient's color in the sublayer.

// Color change animation
CABasicAnimation *colorChange = [CABasicAnimation animationWithKeyPath:@"colors"];
colorChange.toValue = @[(__bridge id)[NSColor blueColor].CGColor, (__bridge id)[NSColor greenColor].CGColor];
colorChange.duration = 2.0;
colorChange.autoreverses = YES;
colorChange.repeatCount = HUGE_VALF;
[gradientLayer addAnimation:colorChange forKey:@"colorChangeAnimation"];
Color change + gradient layer + rotation + scale

After spending several days trying to parse out Display PostScript, Quartz and OpenGL, this gives me the same feeling as using SwiftUI for the first time in 2019. You just tell the CALayer what to do… and it just works 🥹.

2014 — The Performance Age: Metal

Fast-forward another seven years.

Steve Jobs is dead. iPhone has eaten the world.

Core Animation — and the UI framework built on top of it, UIKit — has spawned app giants like WhatsApp, Uber, and Candy Crush. For the engineers crafting cutting-edge mobile games, however, there was a creeping problem.

What’s wrong with Core Animation?

The high-level abstractions provided by Core Animation made it trivial to get started and build something great, but abstraction has a cost. Inherently, when you aren’t micromanaging every clock cycle, you’re trading efficiency for ergonomics.

Core Animation is phenomenal for cookie-cutter tasks like animating the opacity of UIButtons or dragging UITableView cells about. But what if you’re rendering a space shooter, a breakneck racing game, or a fully immersive farming simulator?

OpenGL ES (Open Graphics Library for Embedded Systems) was the standard for high-performance graphics APIs on iOS. It was a low-level 3D graphics API that gave fine-grained control over exactly what you were rendering to the screen.

OpenGL ES sounds great. What’s the problem?

OpenGL ES is a third-party library. This meant the software interfaces with the graphics hardware — the GPU — through a driver. Drivers are software that creates an interface to hardware via low-level instructions. These graphics library drivers themselves had to run on the CPU.

In the early 2010s, graphics chips were improving at a breathtaking clip. Their performance was finally starting to overtake that of CPUs. This led to a situation where the OpenGL ES driver, running on sluggish CPU hardware, bottlenecks the performance of graphics code running on the GPU.

Graphics engineers — the boffins building graphics engines like Unreal Engine or Unity — needed to get closer to the hardware. Closer to the Metal.

Key concepts of Metal

Before we start coding, let’s ensure we’re all on the same page with a brief conceptual overview of how the Metal framework actually works — it’ll be a little overwhelming if you’ve never worked with graphics pipelines before, and that’s okay.

  • Shaders are small functions that run on the CPU to handle rendering. The name is historical — back in prehistoric OpenGL days, they just controlled the shading of vector shapes.

  • Vertex shaders transform 3D coordinates in vector space to 2D coordinates, which can map nicely to a plane — such as your screen.

  • Fragment shaders, a.k.a. pixel shaders, color the individual pixels on a screen when a shape is rasterised — that is, transformed from a 2D vector image to dots on a screen.

  • Metal Shading Language is the language we use to write these shaders. It’s based on C++ 2011 — with several language features trimmed down and some graphics-focused features mixed in.

  • MTLDevice is an abstraction in MetalKit representing the hallowed hardware of the GPU itself.

  • MTLCommandBuffer is the place where drawing instructions are stored before they’re piped over to the hardware for massively parallelised execution.

  • MTLCommandQueue manages the above command buffers while maintaining order of execution.

Does your brain hurt?

Great, that means you’re learning!

Subscribe for free to continue reading

Enter your email and get every post from Jacob’s Tech Tavern.
Already have an account? Sign in
© 2026 Jacob Bartlett · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for writing, podcasting, and media founders.