Function

CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext(_:_:_:)

Selects the display link most optimal for the current renderer of an OpenGL context.

Declaration

func CVDisplayLinkSetCurrentCGDisplayFromOpenGLContext(_ displayLink: CVDisplayLink, _ cglContext: CGLContextObj, _ cglPixelFormat: CGLPixelFormatObj) -> CVReturn

Parameters

displayLink

The display link whose current display is to be set.

cglContext

The OpenGL context to retrieve the current renderer from.

cglPixelFormat

The OpenGL pixel format used to create the passed-in OpenGL context.

Return Value

A Core Video result code. See Core Video Constants for possible values.

Discussion

This function chooses the display with the lowest refresh rate.