IOSurfaceImporter

Imports macOS IOSurfaces as color buffers that sample the IOSurface directly, without copying it.

Importers are created by drivers that implement IOSurfaceImporterFactory. All functions must be called on the thread that draws.

Since

openrndr 0.5.1

Functions

Link copied to clipboard
abstract override fun close()

Waits for the GPU, runs all pending actions and destroys the imported color buffers

Link copied to clipboard
abstract fun import(ioSurface: Long, plane: Int = 0): ColorBuffer?

Returns a color buffer that samples plane of ioSurface, an IOSurfaceRef.

Link copied to clipboard
abstract fun runWhenGpuFinished(action: () -> Unit)

Runs action once the GPU has finished the commands issued so far, use it to release an IOSurface only after the GPU is done sampling it

Link copied to clipboard
abstract fun update()

Runs the actions passed to runWhenGpuFinished whose commands have finished