Textures

Create and manipulate structured GPU resources.

Topics

Textures

Create formatted image data.

Creating and Sampling Textures

Load image data into a texture and apply it to a quadrangle.

About Color-Renderable Pixel Format Sizes

Know the size limits of pixel formats used by color render targets in iOS and tvOS GPUs.

Optimizing Texture Data

Optimize a texture’s data to improve GPU or CPU access.

protocol MTLTexture

A resource that holds formatted image data.

class MTLTextureDescriptor

An object that you use to configure new Metal texture objects.

class MTKTextureLoader

An object that decodes common image formats into Metal textures for use in your app.

class MTLSharedTextureHandle

A texture handle that can be shared across process address space boundaries.

enum MTLPixelFormat

The data formats that describe the organization and characteristics of individual pixels in a texture.

Samplers

Define how your shader samples texture data.

protocol MTLSamplerState

An object that defines how a texture should be sampled.

class MTLSamplerDescriptor

An object that you use to configure a texture sampler.

See Also

Resources

Setting Resource Storage Modes

Set a storage mode that defines the memory location and access permissions of a resource.

Transferring Data Between Connected GPUs

Use high-speed connections between GPUs to transfer data quickly.

protocol MTLResource

An allocation of memory that is accessible to a GPU.

protocol MTLBlitCommandEncoder

An encoder that encodes memory copying, filtering, and fill commands.

Buffers

Create and manipulate unstructured GPU resources.

Heaps

Create a single allocation of memory from which you can suballocate resources.

Synchronization

Manage access to resources in your app to avoid data hazards.