Class MetalFrameLoop¶
Namespace: Apogee.Graphics.Metal
Assembly: Apogee.Graphics.dll
The Metal frame loop: a few frames in flight, each with its own upload arena and command buffer, and one shared event as the timeline (its value is the number of frames the GPU has finished).
With a swapchain it takes the next drawable and presents it; without one it renders headless. GPU timings are not measured yet, so
public sealed class MetalFrameLoop : FrameLoop, IDisposable
Inheritance¶
object ← FrameLoop ← MetalFrameLoop
Implements¶
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¶
FramesInFlight¶
public override int FramesInFlight { get; }
Property Value¶
Swapchain¶
public override Swapchain? Swapchain { get; set; }
Property Value¶
Timings¶
The GPU time of the named sections of the most recent finished frame, in order.
public override IReadOnlyList<GpuTiming> Timings { get; }
Property Value¶
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 override Frame? BeginFrame()
Returns¶
Dispose()¶
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public override void Dispose()
EndFrame(Frame)¶
Submits the frame, then presents it.
public override void EndFrame(Frame frame)
Parameters¶
frame Frame
WaitIdle()¶
public override void WaitIdle()