Skip to content

Class VulkanFrameLoop

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

The Vulkan frame loop: a single timeline semaphore says which of the frames in flight the GPU has finished. With a swapchain it acquires and presents; without one it renders headless.

public sealed class VulkanFrameLoop : FrameLoop, IDisposable

Inheritance

object ← FrameLoop ← VulkanFrameLoop

Implements

IDisposable

Inherited Members

FrameLoop.Swapchain, FrameLoop.FramesInFlight, FrameLoop.FrameNumber, FrameLoop.Timings, FrameLoop.BeginFrame(), FrameLoop.EndFrame(Frame), FrameLoop.WaitIdle(), FrameLoop.Dispose(), object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

Properties

FrameNumber

The number of frames that were begun.

public override ulong FrameNumber { get; }

Property Value

ulong

FramesInFlight

public override int FramesInFlight { get; }

Property Value

int

Swapchain

Where frames are presented; null renders headless. Set it again after replacing the swapchain.

public override Swapchain? Swapchain { get; set; }

Property Value

Swapchain?

Timings

The GPU timings of the most recent frame the GPU finished (one or two frames behind), in the order the sections began.

public override IReadOnlyList<GpuTiming> Timings { get; }

Property Value

IReadOnlyList<GpuTiming>

Methods

BeginFrame()

Starts a frame, waiting for the GPU if it is still busy with the frame that used this slot before. Returns null when there is nothing to render to this time (the window is minimized, or the swapchain had to be recreated): skip the frame and call it again.

public override Frame? BeginFrame()

Returns

Frame?

Dispose()

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

public override void Dispose()

EndFrame(Frame)

Submits the frame and presents it. A frame's window image must be in by now.

public override void EndFrame(Frame frame)

Parameters

frame Frame

WaitIdle()

public override void WaitIdle()