Instance Method

canDraw(inCGLContext:pixelFormat:forLayerTime:displayTime:)

Returns whether the receiver should draw OpenGL content for the specified time.

Declaration

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

Parameters

glContext

The CGLContextObj in to which the OpenGL content would be drawn.

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.

Return Value

true if the receiver should render OpenGL content, false otherwise.

Discussion

This method is called before attempting to render the frame for the layer time specified by timeInterval. If the method returns false, the frame is skipped. The default implementation always returns true.

See Also

Drawing Layer Content

var isAsynchronous: Bool

Determines when the contents of the layer are updated.

Deprecated

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