Gondwana Game Engine
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, mobile, and web platforms using SkiaSharp for graphics and NAudio for sound.
Loading...
Searching...
No Matches
Gondwana.Rendering.RenderSurfaceHostBase Class Referenceabstract

Represents a base class for hosting a render surface, providing functionality for managing rendering operations, backbuffer access, and integration with platform-specific adapters. More...

Inheritance diagram for Gondwana.Rendering.RenderSurfaceHostBase:
Gondwana.Rendering.RenderSurfaceHost< TBackbuffer >

Public Member Functions

void Dispose ()
 Releases all resources used by this RenderSurfaceHostBase instance.

Protected Member Functions

 RenderSurfaceHostBase ()
 Initializes a new instance of the RenderSurfaceHostBase class and registers it with the RenderSurfaceHostRegistry.
virtual void Dispose (bool disposing)
 Releases resources used by this RenderSurfaceHostBase instance and unregisters it from the RenderSurfaceHostRegistry.

Properties

BackbufferBase Backbuffer [get]
 Gets the in-memory BackbufferBase associated with the current rendering context.
Scene Scene [get]
 Gets the source Scenes.Scene used for rendering operations.
RenderSurfaceAdapterBaseRenderSurfaceAdapter [get]
 Gets the platform-specific RenderSurfaceAdapterBase responsible for rendering the image from the Backbuffer.
ViewManager ViewManager [get]
 Gets the view manager that controls camera positions, viewports, and multi-view rendering for this render surface host.

Detailed Description

Represents a base class for hosting a render surface, providing functionality for managing rendering operations, backbuffer access, and integration with platform-specific adapters.

Constructor & Destructor Documentation

◆ RenderSurfaceHostBase()

Gondwana.Rendering.RenderSurfaceHostBase.RenderSurfaceHostBase ( )
protected

Initializes a new instance of the RenderSurfaceHostBase class and registers it with the RenderSurfaceHostRegistry.

Registration ensures the render surface host is tracked for lifecycle management and can be enumerated by other system components.

Member Function Documentation

◆ Dispose() [1/2]

void Gondwana.Rendering.RenderSurfaceHostBase.Dispose ( )

Releases all resources used by this RenderSurfaceHostBase instance.

This method unregisters the render surface host from the RenderSurfaceHostRegistry and releases any managed resources. Derived classes should override Dispose(bool) to release additional resources specific to their implementation.

After calling Dispose(), this instance should not be used. Calling Dispose() multiple times is safe and has no additional effect.

◆ Dispose() [2/2]

virtual void Gondwana.Rendering.RenderSurfaceHostBase.Dispose ( bool disposing)
protectedvirtual

Releases resources used by this RenderSurfaceHostBase instance and unregisters it from the RenderSurfaceHostRegistry.

Parameters
disposingtrue to release both managed and unmanaged resources; false to release only unmanaged resources (called from finalizer).

This method always unregisters the instance from the registry. Derived classes should override this method to release additional resources but must call the base implementation to ensure proper unregistration.

Reimplemented in Gondwana.Rendering.RenderSurfaceHost< TBackbuffer >.

Property Documentation

◆ Backbuffer

BackbufferBase Gondwana.Rendering.RenderSurfaceHostBase.Backbuffer
getabstract

Gets the in-memory BackbufferBase associated with the current rendering context.

◆ RenderSurfaceAdapter

RenderSurfaceAdapterBase? Gondwana.Rendering.RenderSurfaceHostBase.RenderSurfaceAdapter
getabstract

Gets the platform-specific RenderSurfaceAdapterBase responsible for rendering the image from the Backbuffer.

◆ Scene

Scene Gondwana.Rendering.RenderSurfaceHostBase.Scene
getabstract

Gets the source Scenes.Scene used for rendering operations.

◆ ViewManager

ViewManager Gondwana.Rendering.RenderSurfaceHostBase.ViewManager
getabstract

Gets the view manager that controls camera positions, viewports, and multi-view rendering for this render surface host.

The ViewManager instance managing all views associated with this render surface host.

The view manager enables split-screen, picture-in-picture, and minimap rendering by managing multiple views with independent cameras and viewports.