Skip to content

Class Frame

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

One frame in flight: its command buffer, the window's image, per-frame upload memory, and deferred destruction.

public sealed class Frame

Inheritance

object ← Frame

Inherited Members

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

Properties

Backbuffer

The window's image, or null when rendering headless.

public Backbuffer? Backbuffer { get; }

Property Value

Backbuffer?

Number

Counts up from 0 with every frame that was begun.

public ulong Number { get; }

Property Value

ulong

Recorder

Records into this frame's command buffer.

public CommandRecorder Recorder { get; }

Property Value

CommandRecorder

SlotIndex

Which of the frames in flight this is (0 or 1): per-frame resources are indexed by it.

public int SlotIndex { get; }

Property Value

int

Methods

Allocate(int, int)

Gives out size bytes of host-visible memory that stays valid until the GPU is done with this frame. The memory is not zeroed.

public FrameAllocation Allocate(int size, int alignment = 256)

Parameters

size int

alignment int

Returns

FrameAllocation

Defer(IDisposable)

Disposes resource once the GPU has finished this frame: the way to free something the frame's commands still use.

public void Defer(IDisposable resource)

Parameters

resource IDisposable

Scope(string)

Opens a named section: a debug label for RenderDoc and a GPU timer reported in .

public FrameScope Scope(string name)

Parameters

name string

Returns

FrameScope