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>?) -> BoolParameters
- ctx:
The
CGLContextObjin to which the OpenGL content would be drawn. - pf:
The pixel format used when the
glContextwas created. - t:
The current layer time.
- ts:
The display timestamp associated with
timeInterval. Can benull.
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.