Skip to content

GraphicsAPI reference

Class GraphicsDeviceOptions

Namespace: MicroEngine.Graphics.Devices
Assembly: MicroEngine.Graphics.dll
Guide: The graphics device

Device creation options.

C#
public sealed record GraphicsDeviceOptions : IEquatable<GraphicsDeviceOptions>

Inheritance

object ← GraphicsDeviceOptions

Implements

IEquatable<GraphicsDeviceOptions>

Constructors

GraphicsDeviceOptions(PresentMode, string?, bool, bool)

Device creation options.

C#
public GraphicsDeviceOptions(PresentMode PresentMode = PresentMode.VSync, string? Api = null, bool Debug = false, bool PreferLowPower = false)

Parameters

PresentMode PresentMode

Present mode chosen explicitly (never left to the driver); must be in PresentModes when there is a surface.

Api string?

Preferred underlying API (“direct3d12”, “vulkan”, …) or null for the backend default. Check ApiName after creation.

Debug bool

Enable API validation where available.

PreferLowPower bool

Prefer an integrated adapter.

Properties

Api

Preferred underlying API (“direct3d12”, “vulkan”, …) or null for the backend default. Check ApiName after creation.

C#
public string? Api { get; init; }

Property Value

string?

Debug

Enable API validation where available.

C#
public bool Debug { get; init; }

Property Value

bool

PreferLowPower

Prefer an integrated adapter.

C#
public bool PreferLowPower { get; init; }

Property Value

bool

PresentMode

Present mode chosen explicitly (never left to the driver); must be in PresentModes when there is a surface.

C#
public PresentMode PresentMode { get; init; }

Property Value

PresentMode

Methods

<Clone>$()

C#
public GraphicsDeviceOptions <Clone>$()

Returns

GraphicsDeviceOptions

Deconstruct(out PresentMode, out string?, out bool, out bool)

C#
public void Deconstruct(out PresentMode PresentMode, out string? Api, out bool Debug, out bool PreferLowPower)

Parameters

PresentMode PresentMode

Api string?

Debug bool

PreferLowPower bool

Equals(object?)

C#
public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(GraphicsDeviceOptions?)

C#
public bool Equals(GraphicsDeviceOptions? other)

Parameters

other GraphicsDeviceOptions?

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(GraphicsDeviceOptions?, GraphicsDeviceOptions?)

C#
public static bool operator ==(GraphicsDeviceOptions? left, GraphicsDeviceOptions? right)

Parameters

left GraphicsDeviceOptions?

right GraphicsDeviceOptions?

Returns

bool

operator !=(GraphicsDeviceOptions?, GraphicsDeviceOptions?)

C#
public static bool operator !=(GraphicsDeviceOptions? left, GraphicsDeviceOptions? right)

Parameters

left GraphicsDeviceOptions?

right GraphicsDeviceOptions?

Returns

bool