class CompositorResources
Swift
final class CompositorResources
The client's end of resource naming: LavaUI asks, the compositor answers.
Install it on the editor once, before anything loads, and every font id and texture id the app stamps into a frame becomes one the renderer will resolve to the same thing:
guard let editor = LavaClient.open(title: "My App") else { exit(1) }
editor.resources = CompositorResources(compositor)
Nothing above that line changes. FontStore and ImageStore keep their
caches, their budget and their eviction, because none of that was ever
about who owns the GPU — only the ids were, and this is the whole of that
difference. See GPUResourceHost.
Sources/LavaClient/ControlPlane.swift:146
Constructors
init(_ compositor: Compositor)
Not documented.
Sources/LavaClient/ControlPlane.swift:168
Methods
func registerFont(path: String, pixelSize26_6: UInt32, faceIndex: UInt32, rasterFlags: UInt32) -> UInt32?
Not documented.
Sources/LavaClient/ControlPlane.swift:170
func registerImage(path: String, maxPixelSize: UInt32, turn: LavaUI.ImageTurn) -> UIImage?
Not documented.
Sources/LavaClient/ControlPlane.swift:189
func registerImage(data: [UInt8], maxPixelSize: UInt32) -> UIImage?
Not documented.
Sources/LavaClient/ControlPlane.swift:229
func releaseImage(key: String)
Not documented.
Sources/LavaClient/ControlPlane.swift:260