Fundamental Lessons

Learn how to develop Metal apps by following introductory lessons and guided examples.


The following sample code projects demonstrate fundamental Metal functionality in an ordered, incremental, and simple way.


Fundamental Lessons

Devices and Commands

Demonstrates how to access and interact with the GPU.

Hello Triangle

Demonstrates how to render a simple 2D triangle.

Basic Buffers

Demonstrates how to manage hundreds of vertices with a vertex buffer.

Basic Texturing

Demonstrates how to load image data and texture a quad.

Hello Compute

Demonstrates how to perform data-parallel computations using the GPU.

CPU and GPU Synchronization

Demonstrates how to update buffer data and synchronize access between the CPU and GPU.

Argument Buffers

Learn how to use argument buffers.

Basic Indirect Command Buffers

Demonstrates how to encode an indirect command buffer with the CPU or GPU, and then execute its commands in a separate render command encoder.

See Also

Sample Code

Advanced Techniques

Learn how to implement advanced techniques by using Metal features efficiently.

Mixing Metal and OpenGL Rendering in a View

Draw with Metal and OpenGL in the same view using an interoperable texture.