Contents

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

  • ctx:

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

  • pf:

    The pixel format used when the glContext was created.

  • t:

    The current layer time.

  • ts:

    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