addRenderContext(commandBuffer:)
Adds and returns a render context to a LayerRenderer.Drawable providing a metal command buffer.
Declaration
func addRenderContext(commandBuffer cmd_buffer: any MTLCommandBuffer) -> LayerRenderer.Drawable.RenderContextDiscussion
This object draws any content that the compositor needs to render in the app. The LayerRenderer.Drawable.RenderContext can only be used when the layer renderer is using layered layout or on platforms that only render one view, such as the Simulator. The RenderContext makes use of the deviceAnchor set in cp_drawable_set_device_anchor. Only use the deviceAnchor in the layer renderer drawable before calling addRenderContext(commandBuffer:).