Class

CIRenderDestination

A specification for configuring all attributes of a render task's destination and issuing asynchronous render tasks.

Declaration

@interface CIRenderDestination : NSObject

Overview

The CIRenderDestination class provides an API for specifying a render task destination's properties, such as buffer format, alpha mode, clamping behavior, blending, and color space, properties formerly tied to CIContext.

You can create a CIRenderDestination object for each surface or buffer to which you must render. You can also render multiple times to a single destination with different settings such as colorspace and blend mode by mutating a single CIRenderDestination object between renders.

Renders issued to a CIRenderDestination return to the caller as soon as the CPU has issued the task, rather than after the GPU has performed the task, so you can start render tasks on subsequent frames without waiting for previous renders to finish. If the render fails, a CIRenderTask will return immediately.

Topics

Creating a Render Destination

- initWithPixelBuffer:

Creates a render destination based on a Core Video pixel buffer.

- initWithIOSurface:

Creates a render destination based on an IOSurface object.

- initWithMTLTexture:commandBuffer:

Creates a render destination based on a Metal texture.

- initWithWidth:height:pixelFormat:commandBuffer:mtlTextureProvider:

Creates a render destination based on a Metal texture with specified pixel format.

- initWithGLTexture:target:width:height:

Creates a render destination based on an OpenGL texture.

- initWithBitmapData:width:height:bytesPerRow:format:

Creates a render destination based on a client-managed buffer.

Customizing Rendering

alphaMode

The render destination's representation of alpha (transparency) values.

CIRenderDestinationAlphaMode

Different ways of representing alpha.

blendKernel

The destination's blend kernel.

blendsInDestinationColorSpace

Indicator of whether to blend in the destination's color space.

colorSpace

The destination's color space.

width

The render destination's row width.

height

The render destination's buffer height.

clamped

Indicator of whether or not the destination clamps.

dithered

Indicator of whether or not the destination dithers.

flipped

Indicator of whether the destination is flipped.

Relationships

Inherits From

See Also

Custom Render Destination

CIRenderInfo

An encapsulation of a render task's timing, passes, and pixels processed.

CIRenderTask

A single render task issued in conjunction with CIRenderDestination.