Contents

draw(in:pixelFormat:forLayerTime:displayTime:)

Draws the OpenGL content for the specified time.

Declaration

func draw(in context: NSOpenGLContext, pixelFormat: NSOpenGLPixelFormat, forLayerTime t: CFTimeInterval, displayTime ts: UnsafePointer<CVTimeStamp>)

Parameters

  • context:

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

  • pixelFormat:

    The pixel format used when the context was created.

  • t:

    The current layer time.

  • ts:

    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.

See Also

Drawing the Content