Skip to content

Class FrameLoop

Namespace: Apogee.Graphics
Assembly: Apogee.Graphics.dll

Keeps frames in flight (two by default): each has its own command buffer, upload arena and timer queries, and waits only for the frame that used its slot two frames ago. Without a swapchain it runs headless: the same frames with no window image, for screenshots, tests and servers. Made by .

public abstract class FrameLoop : IDisposable

Inheritance

object ← FrameLoop

Derived

MetalFrameLoop, VulkanFrameLoop

Implements

IDisposable

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Properties

FrameNumber

The number of frames that were begun.

public abstract ulong FrameNumber { get; }

Property Value

ulong

FramesInFlight

public abstract int FramesInFlight { get; }

Property Value

int

Swapchain

public abstract Swapchain? Swapchain { get; set; }

Property Value

Swapchain?

Timings

The GPU time of the named sections of the most recent finished frame, in order.

public abstract IReadOnlyList<GpuTiming> Timings { get; }

Property Value

IReadOnlyList<GpuTiming>

Methods

BeginFrame()

Starts a frame; null when there is nothing to draw to (the window is minimized, or the swapchain was just recreated): try again next time.

public abstract Frame? BeginFrame()

Returns

Frame?

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public abstract void Dispose()

EndFrame(Frame)

Submits the frame, then presents it.

public abstract void EndFrame(Frame frame)

Parameters

frame Frame

WaitIdle()

public abstract void WaitIdle()