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.RenderSurfaceAdapterBase Class Referenceabstract
Inheritance diagram for Gondwana.Rendering.RenderSurfaceAdapterBase:
Gondwana.WinForms.Rendering.WinFormBitmapRenderSurfaceAdapter Gondwana.WinForms.Rendering.WinFormGpuRenderSurfaceAdapter

Public Member Functions

void Present (SKImage bufferImage, SKRectI bufferRect, SKRect destRect)
 Presents the specified portion of the Backbuffer image to the destination rectangle on the RenderSurfaceAdapter.

Protected Member Functions

 RenderSurfaceAdapterBase (int destWidth, int destHeight)
 Initializes a new instance of the RenderSurfaceAdapterBase class with the specified dimensions.
void SetDestinationSize (int destWidth, int destHeight)
 Sets the destination size of the render surface and raises the Resized event if the dimensions have changed.

Properties

int Width [get, protected set]
 Gets the current width of the render surface in pixels.
int Height [get, protected set]
 Gets the current height of the render surface in pixels.

Events

Action< RenderSurfaceAdapterResizedEventArgs >? Resized
 Occurs when the render surface adapter is resized.

Constructor & Destructor Documentation

◆ RenderSurfaceAdapterBase()

Gondwana.Rendering.RenderSurfaceAdapterBase.RenderSurfaceAdapterBase ( int destWidth,
int destHeight )
protected

Initializes a new instance of the RenderSurfaceAdapterBase class with the specified dimensions.

Parameters
destWidthThe initial width of the render surface in pixels.
destHeightThe initial height of the render surface in pixels.

Member Function Documentation

◆ Present()

void Gondwana.Rendering.RenderSurfaceAdapterBase.Present ( SKImage bufferImage,
SKRectI bufferRect,
SKRect destRect )
abstract

Presents the specified portion of the Backbuffer image to the destination rectangle on the RenderSurfaceAdapter.

The method maps the specified region of the buffer image to the destination rectangle, scaling or transforming as necessary. Callers must ensure that the dimensions and coordinates of bufferRect and destRect are valid.

Parameters
bufferImageThe source image from which to present. Cannot be null.
bufferRectThe rectangular region of the buffer image to present. Coordinates are in the buffer image's space.
destRectThe rectangular region in the destination space where the presented content will be drawn.

◆ SetDestinationSize()

void Gondwana.Rendering.RenderSurfaceAdapterBase.SetDestinationSize ( int destWidth,
int destHeight )
protected

Sets the destination size of the render surface and raises the Resized event if the dimensions have changed.

Parameters
destWidthThe new width of the render surface in pixels.
destHeightThe new height of the render surface in pixels.

If the specified dimensions are the same as the current dimensions, this method returns without making changes or raising the Resized event.

Property Documentation

◆ Height

int Gondwana.Rendering.RenderSurfaceAdapterBase.Height
getprotected set

Gets the current height of the render surface in pixels.

The height of the render surface.

◆ Width

int Gondwana.Rendering.RenderSurfaceAdapterBase.Width
getprotected set

Gets the current width of the render surface in pixels.

The width of the render surface.

Event Documentation

◆ Resized

Action<RenderSurfaceAdapterResizedEventArgs>? Gondwana.Rendering.RenderSurfaceAdapterBase.Resized

Occurs when the render surface adapter is resized.

This event is raised when the Width or Height properties change, providing both the old and new dimensions in the event arguments.