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.Rendering Namespace Reference

Namespaces

namespace  Backbuffers
namespace  Text
namespace  Views

Classes

class  DirtyRectangleExtensions
class  RefreshQueue
class  RenderContext
 Ambient per-render-pass context (per thread). Set once per View render pass in RenderSurfaceHost. SceneLayer-mode drawables can query this when they don't hold a View reference.
class  RenderFrameMailbox
 Bounded single-producer/single-consumer mailbox. The monitor protects only slot ownership. Building, replay and resource disposal always happen outside it. A stalled consumer owns one slot; the producer alternates the other two.
class  RenderFrameSnapshot
 Completed visual commands for one surface. Contains no live scene objects. Ownership transfers to the mailbox; only its slot owner may dispose the picture. Skia pictures copy paint/path state and retain native image and font references, so disposing the original managed drawing resources cannot invalidate replay. Recordings must contain CPU resources, never context-bound textures or surfaces.
class  RenderStateSynchronization
 Serializes Engine state and resource disposal with recording and legacy live rendering. Desktop snapshot replay never enters this gate. The GPU admission helpers remain for the synchronous live WebGL/custom-backbuffer path; resize notifications also use SyncRoot briefly to update viewports. Do not use this gate around picture replay.
class  RenderSurfaceAdapterBase
 Represents the abstract base class for render surface adapters that present backbuffer output to a destination surface. More...
class  RenderSurfaceAdapterResizedEventArgs
 Provides data for the RenderSurfaceAdapterBase.Resized event. More...
class  RenderSurfaceHost< TBackbuffer >
 Hosts a render surface and manages rendering of a scene to a backbuffer of the specified type. Provides coordination between the scene, views, and the underlying UI adapter for efficient rendering and presentation. More...
class  RenderSurfaceHostBase
 Represents a base class for hosting a render surface, providing functionality for managing rendering operations, backbuffer access, and integration with platform-specific adapters. More...
class  RenderSurfaceHostBindEventArgs
 Provides data for the RenderSurfaceHost<TBackbuffer>.BindToScene event. More...
class  RenderSurfaceHostRegistry
 Provides a central registry for tracking all active RenderSurfaceHostBase instances in the application.

Enumerations

enum  RenderScalingFilter { Linear , NearestNeighbor }
 Filtering used only when presenting the finished Backbuffer. More...

Functions

record GpuLayerRenderDiagnostics (int LayerIndex, string LayerId, int ZOrder, int DrawableCount, int TileCount, int TransformedTileCount, int TileWidth, int TileHeight, double QueryAndSortMilliseconds, double DrawMilliseconds)
 Captures the measured work performed for one scene layer during a full-frame GPU render.
record GpuRenderFrameDiagnostics (double TotalRenderMilliseconds, double QueryAndSortMilliseconds, double DrawMilliseconds, double OverlayMilliseconds, int DrawableCount, int TileCount, IReadOnlyList< GpuLayerRenderDiagnostics > Layers)
 Captures measured scene-render work for one full-frame GPU render.
record GpuRenderSynchronizationDiagnostics (double LockWaitMilliseconds, double LockHeldMilliseconds)
 Captures time spent waiting for and holding the shared live render-state synchronization gate.
readonly record struct PresentationTransform (float Scale, SKRect DestinationRect)
 Aspect-preserving mapping between logical Backbuffer ScreenPx and adapter pixels.

Enumeration Type Documentation

◆ RenderScalingFilter

Filtering used only when presenting the finished Backbuffer.

Enumerator
Linear 

Bilinear presentation filtering.

NearestNeighbor 

Unfiltered nearest-pixel presentation for pixel art.

Definition at line 60 of file PresentationTransform.cs.

Function Documentation

◆ GpuLayerRenderDiagnostics()

record Gondwana.Rendering.GpuLayerRenderDiagnostics ( int LayerIndex,
string LayerId,
int ZOrder,
int DrawableCount,
int TileCount,
int TransformedTileCount,
int TileWidth,
int TileHeight,
double QueryAndSortMilliseconds,
double DrawMilliseconds )
sealed

Captures the measured work performed for one scene layer during a full-frame GPU render.

Parameters
LayerIndexThe layer index.
LayerIdThe layer id.
ZOrderThe drawing order relative to other content.
DrawableCountThe drawable count.
TileCountThe tile count.
TransformedTileCountThe transformed tile count.
TileWidthThe tile width.
TileHeightThe tile height.
QueryAndSortMillisecondsThe query and sort milliseconds.
DrawMillisecondsThe draw milliseconds.

◆ GpuRenderFrameDiagnostics()

record Gondwana.Rendering.GpuRenderFrameDiagnostics ( double TotalRenderMilliseconds,
double QueryAndSortMilliseconds,
double DrawMilliseconds,
double OverlayMilliseconds,
int DrawableCount,
int TileCount,
IReadOnlyList< GpuLayerRenderDiagnostics > Layers )
sealed

Captures measured scene-render work for one full-frame GPU render.

Parameters
TotalRenderMillisecondsThe total render milliseconds.
QueryAndSortMillisecondsThe query and sort milliseconds.
DrawMillisecondsThe draw milliseconds.
OverlayMillisecondsThe overlay milliseconds.
DrawableCountThe drawable count.
TileCountThe tile count.
LayersThe layers.

Time gathering visible drawable candidates before sorting.

Time validating existing order or sorting the gathered drawable lists.

Number of DrawAtlas operations recorded for fixed-grid tiles.

Number of fixed-grid tiles represented by DrawAtlas operations.

Definition at line 38 of file GpuRenderFrameDiagnostics.cs.

◆ GpuRenderSynchronizationDiagnostics()

record Gondwana.Rendering.GpuRenderSynchronizationDiagnostics ( double LockWaitMilliseconds,
double LockHeldMilliseconds )
sealed

Captures time spent waiting for and holding the shared live render-state synchronization gate.

Parameters
LockWaitMillisecondsThe lock wait milliseconds.
LockHeldMillisecondsThe lock held milliseconds.

CPU time replaying completed commands and flushing the backbuffer.

CPU time spent replaying the recorded SKPicture onto the GPU backbuffer canvas.

CPU time spent flushing the GPU backbuffer after picture replay.

CPU time spent creating the lightweight GPU-backed snapshot used for presentation.

Age of the completed snapshot when acquired by GL.

Total snapshots published by this surface.

Total published snapshots replaced before acquisition.

Occupied slots at acquisition, including the rendering slot (maximum three).

Approximate number of native Skia operations in the acquired recording.

Definition at line 66 of file GpuRenderFrameDiagnostics.cs.

◆ PresentationTransform()

readonly record struct Gondwana.Rendering.PresentationTransform ( float Scale,
SKRect DestinationRect )

Aspect-preserving mapping between logical Backbuffer ScreenPx and adapter pixels.

Parameters
ScaleThe scale from logical backbuffer pixels to adapter pixels.
DestinationRectThe centered presentation rectangle in adapter pixels.

Fits the entire logical image inside the adapter, centered on both axes.

Parameters
bufferWidthThe logical backbuffer width in pixels.
bufferHeightThe logical backbuffer height in pixels.
adapterWidthThe adapter width in pixels.
adapterHeightThe adapter height in pixels.
Returns
The aspect-preserving scale and centered destination rectangle.

Maps input without clamping margins. False means outside the presented game area.

Parameters
adapterPxThe adapter px.
screenPxThe point in logical backbuffer screen pixels.
Returns
true if the operation succeeded; otherwise, false.

Maps logical dirty edges outwards to avoid gaps at fractional presentation scales.

Parameters
screenRectThe rectangle in logical backbuffer screen pixels.
Returns
The enclosing adapter-pixel rectangle, rounded outward to cover fractional edges.

Definition at line 9 of file PresentationTransform.cs.