Gondwana Game Engine Development (master) - 2.6.1
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
Loading...
Searching...
No Matches
Gondwana.Avalonia.Rendering.AvaloniaGpuRenderSurfaceControl Class Reference

An Avalonia OpenGlControlBase that displays game frames produced by the Gondwana engine using GPU-accelerated rendering. More...

Inheritance diagram for Gondwana.Avalonia.Rendering.AvaloniaGpuRenderSurfaceControl:

Public Member Functions

 AvaloniaGpuRenderSurfaceControl ()
 Initializes a new instance of the AvaloniaGpuRenderSurfaceControl class.
void Dispose ()
 Ends the logical surface lifecycle. The hosting class calls this on shutdown; custom hosts should call it when permanently removing the control. Native GPU teardown remains in Avalonia's current-context deinitialization callback.

Protected Member Functions

override void OnOpenGlInit (GlInterface gl)
override void OnOpenGlRender (GlInterface gl, int fb)
override void OnOpenGlDeinit (GlInterface gl)

Properties

AvaloniaGpuRenderSurfaceAdapter Adapter [get]
 Gets the GPU render surface adapter used to drive this control.
RenderSurfaceHost< GpuBackbuffer > Host [get]
 Gets the RenderSurfaceHost<T> bound to this control.

Detailed Description

An Avalonia OpenGlControlBase that displays game frames produced by the Gondwana engine using GPU-accelerated rendering.

Rendering uses Avalonia's native OpenGL surface. SkiaSharp's GRContext is created from the current OpenGL context on the first render callback and is used to manage both the GpuBackbuffer off-screen surface and the window framebuffer blit. No CPU↔GPU pixel copies occur.

The engine's AfterFrameRender event posts RequestNextFrameRendering() to the UI thread to pace frame delivery in lockstep with Gondwana.Configuration.EngineConfiguration.TargetFPS.

This control targets desktop Avalonia platforms (Windows, macOS, Linux) that support OpenGL. Use AvaloniaBitmapRenderSurfaceControl for cross-platform / WASM scenarios instead.

Definition at line 31 of file AvaloniaGpuRenderSurfaceControl.cs.

Constructor & Destructor Documentation

◆ AvaloniaGpuRenderSurfaceControl()

Gondwana.Avalonia.Rendering.AvaloniaGpuRenderSurfaceControl.AvaloniaGpuRenderSurfaceControl ( )

Initializes a new instance of the AvaloniaGpuRenderSurfaceControl class.

Definition at line 59 of file AvaloniaGpuRenderSurfaceControl.cs.

Member Function Documentation

◆ Dispose()

void Gondwana.Avalonia.Rendering.AvaloniaGpuRenderSurfaceControl.Dispose ( )

Ends the logical surface lifecycle. The hosting class calls this on shutdown; custom hosts should call it when permanently removing the control. Native GPU teardown remains in Avalonia's current-context deinitialization callback.

Definition at line 188 of file AvaloniaGpuRenderSurfaceControl.cs.

◆ OnOpenGlDeinit()

override void Gondwana.Avalonia.Rendering.AvaloniaGpuRenderSurfaceControl.OnOpenGlDeinit ( GlInterface gl)
protected

Definition at line 168 of file AvaloniaGpuRenderSurfaceControl.cs.

◆ OnOpenGlInit()

override void Gondwana.Avalonia.Rendering.AvaloniaGpuRenderSurfaceControl.OnOpenGlInit ( GlInterface gl)
protected

Definition at line 76 of file AvaloniaGpuRenderSurfaceControl.cs.

◆ OnOpenGlRender()

override void Gondwana.Avalonia.Rendering.AvaloniaGpuRenderSurfaceControl.OnOpenGlRender ( GlInterface gl,
int fb )
protected

Definition at line 110 of file AvaloniaGpuRenderSurfaceControl.cs.

Property Documentation

◆ Adapter

AvaloniaGpuRenderSurfaceAdapter Gondwana.Avalonia.Rendering.AvaloniaGpuRenderSurfaceControl.Adapter
get

Gets the GPU render surface adapter used to drive this control.

Definition at line 49 of file AvaloniaGpuRenderSurfaceControl.cs.

◆ Host

RenderSurfaceHost<GpuBackbuffer> Gondwana.Avalonia.Rendering.AvaloniaGpuRenderSurfaceControl.Host
get

Gets the RenderSurfaceHost<T> bound to this control.

Definition at line 54 of file AvaloniaGpuRenderSurfaceControl.cs.