Can WinUI 3 be used for offscreen rendering of a xaml tree?

Viewed 223

I would like to use the new WinUI 3 framework to render a 2D xaml tree to a DirectX texture.

Ideally, I want to be able to supply the WinUI infrastructure with my own DirectX device, context and rendering target and it will render the xaml content onto my rendering target.

I basically want to embed WinUI 3 into an existing 3D graphics engine.

From skimming through the documentation, I can see that some form of DirectX interoperability exists via CompositionGraphicsDevice class. But I haven't been able to understand if this mechanism is intended to be used in order to embed custom D3D content into an existing WinUI-based UI or the other way around.

So Can this be done? Can WinUI 3 be used for offscreen rendering of a xaml tree without creating a Window? Can you outline the steps required to do so?

0 Answers
Related