IUiRenderBackend
- Namespace: Turian.Engine.UI
- Source File: IUiRenderBackend.cs
Turns a Guinevere draw pass into an engine Texture that a render pass can composite — full-screen for a screen-space HUD, or on a quad for a world-space panel. The shipping implementation rasterizes with CPU SkiaSharp and uploads the snapshot each frame (CpuSkiaVulkanBackend). The interface exists so a GPU-backed Skia renderer that shares the engine's Vulkan device — no readback — can replace it without touching the runtime or the render pass.
Properties
Size
((int Width, int Height)) : Current target size in pixels.
Texture
(Texture?) : The most recently rendered frame as a sampleable texture, or null before the first Render. The reference is stable across frames unless Resize reallocates it.
Public Methods
Resize
void Resize(int width, int height)
Resizes the render target. Does nothing when the size is unchanged.
Parameters:
width(int): New width in pixels, greater than zero.height(int): New height in pixels, greater than zero.
Render
void Render(Action<SKCanvas> draw)
Runs one UI frame: draw receives the canvas, and the result is published to Texture.
Parameters:
draw(Action): Receives the canvas for one Guinevere render pass.