PixelBuffer
public class PixelBuffer : Output
PixelBuffer output presents provided OffscreenRenderTarget into the CVPixelBuffer with defined orientation.
Uses TextureCache to speedup GPU to CPU pixels transfer.
-
Create pixel buffer output
Declaration
Swift
public init(onPresent: @escaping (CVPixelBuffer?) -> Void, orientation: Orientation = .up)Parameters
onPresentcallback is fired when frame is presented
orientationframe orientation counterclockwise
-
Declaration
Swift
public func present(renderTarget: OffscreenRenderTarget)
PixelBuffer Class Reference