Type Method

contextWithCGLContext:pixelFormat:options:

Creates a Core Image context from a CGL context, using the specified options and pixel format object.

Declaration

+ (CIContext *)contextWithCGLContext:(CGLContextObj)cglctx pixelFormat:(CGLPixelFormatObj)pixelFormat options:(NSDictionary<CIContextOption, id> *)options;

Parameters

ctx

A CGL context (CGLContextObj object) obtain by calling the CGL function CGLCreateContext.

pf

A CGL pixel format object (CGLPixelFormatObj object) created by calling the CGL function CGLChoosePixelFormat. This argument must be the same pixel format object used to create the CGL context. The pixel format object must be valid for the lifetime of the Core Image context. Don’t release the pixel format object until after you release the Core Image context.

options

A dictionary that contains color space information. You can provide the keys kCIContextOutputColorSpace or kCIContextWorkingColorSpace along with a CGColorSpaceRef object for each color space.

See Also

Creating a Context for GPU-Based Rendering with OpenGL

+ contextWithCGLContext:pixelFormat:colorSpace:options:

Creates a Core Image context from a CGL context, using the specified options, color space, and pixel format object.

Deprecated
+ contextWithEAGLContext:

Creates a Core Image context from an EAGL context.

Deprecated
+ contextWithEAGLContext:options:

Creates a Core Image context from an EAGL context using the specified options.

Deprecated
+ contextForOfflineGPUAtIndex:

Creates an OpenGL-based Core Image context using a GPU that is not currently driving a display.

Deprecated
+ contextForOfflineGPUAtIndex:colorSpace:options:sharedContext:

Creates an OpenGL-based Core Image context using a GPU that is not currently driving a display, with the specified options.

Deprecated