CArcUIWorldWidgetRenderer
Renders an Arc widget tree into an offscreen engine texture so the scene renderer can draw it as a real in-world quad (nameplates, ping markers). It reuses Arc's own CArcUIRenderer against the bridge-adopted device — it is not a second UI renderer, just a second target — and records into the engine's current command buffer through the RHI facade, one small render pass per widget. Each widget keeps its own resolution-sized target and is only re-rendered when the screen stack marks it dirty (content changed or the distance LOD bucket moved), so an idle nameplate costs nothing per frame.
- Module
- ArcUI
- Header
#include "ArcUI/CArcUIWorldWidgetRenderer.h"- Namespace
Mowo
The offscreen pass runs under the engine's negative-height (Vulkan Y-flip) viewport, so the produced texture is vertically mirrored relative to the UI; the world-widget quad shader reads it back with a matching V so it lands right-side-up. Colours are written in the overlay's BGRA8 space.
Constructors
| Signature | Name | Description |
|---|---|---|
CArcUIWorldWidgetRenderer() | CArcUIWorldWidgetRenderer | |
~CArcUIWorldWidgetRenderer() | ~CArcUIWorldWidgetRenderer | |
CArcUIWorldWidgetRenderer(const CArcUIWorldWidgetRenderer&) = delete | CArcUIWorldWidgetRenderer |
Public functions
| Returns | Name | Description |
|---|---|---|
CArcUIWorldWidgetRenderer& | operator= | |
bool | IsAvailable | True once the bridge device is up and Arc's offscreen pipelines built. |
bool | EnsureRenderer | |
uint32_t | RecordPending | |
Ref<Image2D> | RenderWidget | Renders widget into owner's cached target at width x height and returns the target's colour image for the scene renderer to sample. |
void | Release | Drops the cached target for an owner that is no longer visible. |
void | Clear | Drops every cached target (device teardown / world change). |
Function details
CArcUIWorldWidgetRenderer
CArcUIWorldWidgetRenderer()~CArcUIWorldWidgetRenderer
~CArcUIWorldWidgetRenderer()CArcUIWorldWidgetRenderer
CArcUIWorldWidgetRenderer(const CArcUIWorldWidgetRenderer&) = deleteoperator=
CArcUIWorldWidgetRenderer& operator=(const CArcUIWorldWidgetRenderer&) = deleteIsAvailable
bool IsAvailable() constTrue once the bridge device is up and Arc's offscreen pipelines built. Everything no-ops (returning null textures) until it is — the screen stack then keeps the widget on the screen-space fallback.
EnsureRenderer
bool EnsureRenderer()RecordPending
uint32_t RecordPending()RenderWidget
Ref<Image2D> RenderWidget(uint64_t owner, const Arcf::TSharedPtr<Arcf::AWidget>& widget, uint32_t width, uint32_t height, bool forceRedraw)Renders widget into owner's cached target at width x height and returns the target's colour image for the scene renderer to sample. Returns the existing image (no GPU work) when width/height match the cached target and forceRedraw is false. Returns null when unavailable.
Release
void Release(uint64_t owner)Drops the cached target for an owner that is no longer visible.
Clear
void Clear()Drops every cached target (device teardown / world change).