Instance Method


Draws the OpenGL content for the specified time.


func draw(inCGLContext ctx: CGLContextObj, pixelFormat pf: CGLPixelFormatObj, forLayerTime t: CFTimeInterval, displayTime ts: UnsafePointer<CVTimeStamp>?)



The rendering context in to which the OpenGL content should be rendered.


The pixel format used when the glContext was created.


The current layer time.


The display timestamp associated with timeInterval. Can be null.


This method is called when a new frame needs to be generated for the layer time specified by timeInterval. The viewport of glContext is set correctly for the size of the layer. No other state is defined. If the method enables OpenGL features, it should disable them before returning.

The default implementation of the method flushes the context.

See Also

Drawing Layer Content

var isAsynchronous: Bool

Determines when the contents of the layer are updated.


Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software