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
onPresent
callback is fired when frame is presented
orientation
frame orientation counterclockwise
-
Declaration
Swift
public func present(renderTarget: OffscreenRenderTarget)