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
RenderFrameSnapshot.cs
1using SkiaSharp;
2
3namespace Gondwana.Rendering;
4
12internal sealed class RenderFrameSnapshot : IDisposable
13{
14 private readonly SKPicture _commands;
15
16 internal RenderFrameSnapshot(SKPicture commands, long sequence, long producedTick, int width, int height)
17 {
18 _commands = commands;
19 Sequence = sequence;
20 ProducedTick = producedTick;
21 Width = width;
22 Height = height;
23 }
24
25 internal long Sequence { get; }
26 internal long ProducedTick { get; }
27 internal int Width { get; }
28 internal int Height { get; }
29 internal int CommandCount => _commands.ApproximateOperationCount;
30
31 internal void Replay(SKCanvas canvas) => canvas.DrawPicture(_commands);
32
36 public void Dispose() => _commands.Dispose();
37}