Skip to content

Custom Render Surfaces

Isthimius edited this page Jun 22, 2026 · 1 revision

Gondwana’s rendering edge is intentionally abstracted behind two concepts:

  • RenderSurfaceHostBase
  • RenderSurfaceAdapterBase

If you want a new host platform or a specialized presentation target, this is where you start.


Host vs adapter

The host owns:

  • the scene binding
  • the view manager
  • the backbuffer
  • render orchestration

The adapter owns:

  • surface width/height
  • resize notifications
  • presenting an SKImage to the actual UI surface

Why that split exists

The engine wants to stay platform-agnostic. It should not care whether the destination is:

  • WinForms
  • Avalonia
  • Blazor canvas interop
  • some future custom control

As long as an adapter can present rendered output and report size changes, the engine can do the rest.


Practical extension points

To add a custom render surface, you typically need:

  • a RenderSurfaceAdapterBase implementation
  • a compatible host/backbuffer pairing
  • resize wiring
  • presentation logic

Where to read next

  • Gondwana/Rendering/RenderSurfaceHostBase.cs
  • Gondwana/Rendering/RenderSurfaceAdapterBase.cs
  • Gondwana/Rendering/RenderSurfaceHost.cs
  • platform implementations under Gondwana.WinForms/Rendering/, Gondwana.Avalonia/Rendering/, and Gondwana.Blazor/Rendering/

Clone this wiki locally