Instance Method

draw(inCGLContext:pixelFormat:forLayerTime:displayTime:)

Draws the OpenGL content for the specified time.

Declaration

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

Parameters

glContext

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

pixelFormat

The pixel format used when the glContext was created.

timeInterval

The current layer time.

timeStamp

The display timestamp associated with timeInterval. Can be null.

Discussion

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.

Deprecated