Skip to content

GraphicsAPI reference

Class GraphicsCapabilities

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

What a device declares. Read after creation: the backend identity is what the device reports, not what was requested.

C#
public sealed record GraphicsCapabilities : IEquatable<GraphicsCapabilities>

Inheritance

object ← GraphicsCapabilities

Implements

IEquatable<GraphicsCapabilities>

Constructors

GraphicsCapabilities(string, GraphicsTier, GraphicsFeatures, ShaderFormat, IReadOnlyDictionary<TextureFormat, TextureUsage>, IReadOnlySet<BlendState>, IReadOnlySet<PresentMode>, GraphicsLimits, string, string?)

What a device declares. Read after creation: the backend identity is what the device reports, not what was requested.

C#
public GraphicsCapabilities(string Backend, GraphicsTier Tier, GraphicsFeatures Features, ShaderFormat ShaderFormats, IReadOnlyDictionary<TextureFormat, TextureUsage> Formats, IReadOnlySet<BlendState> BuiltInBlendStates, IReadOnlySet<PresentMode> PresentModes, GraphicsLimits Limits, string ApiName, string? Adapter)

Parameters

Backend string

The factory name (“sdl-renderer”, “sdl-gpu”, …); Device.

Tier GraphicsTier

Tier.

Features GraphicsFeatures

Declared optional features.

ShaderFormats ShaderFormat

Accepted shader formats; None on tier 0.

Formats IReadOnlyDictionary<TextureFormat, TextureUsage>

Usages each texture format supports; a format absent from the map supports nothing.

BuiltInBlendStates IReadOnlySet<BlendState>

Blend states the built-in pipelines support; always contains Presets.

PresentModes IReadOnlySet<PresentMode>

Present modes the surface supports (empty without a surface).

Limits GraphicsLimits

Limits.

ApiName string

Underlying API as reported after creation (“direct3d11”, “direct3d12”, “vulkan”, …).

Adapter string?

Adapter name when the API reports one.

Properties

Adapter

Adapter name when the API reports one.

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

Property Value

string?

ApiName

Underlying API as reported after creation (“direct3d11”, “direct3d12”, “vulkan”, …).

C#
public string ApiName { get; init; }

Property Value

string

Backend

The factory name (“sdl-renderer”, “sdl-gpu”, …); Device.

C#
public string Backend { get; init; }

Property Value

string

BuiltInBlendStates

Blend states the built-in pipelines support; always contains Presets.

C#
public IReadOnlySet<BlendState> BuiltInBlendStates { get; init; }

Property Value

IReadOnlySet<BlendState>

Features

Declared optional features.

C#
public GraphicsFeatures Features { get; init; }

Property Value

GraphicsFeatures

Formats

Usages each texture format supports; a format absent from the map supports nothing.

C#
public IReadOnlyDictionary<TextureFormat, TextureUsage> Formats { get; init; }

Property Value

IReadOnlyDictionary<TextureFormat, TextureUsage>

Limits

Limits.

C#
public GraphicsLimits Limits { get; init; }

Property Value

GraphicsLimits

PresentModes

Present modes the surface supports (empty without a surface).

C#
public IReadOnlySet<PresentMode> PresentModes { get; init; }

Property Value

IReadOnlySet<PresentMode>

ShaderFormats

Accepted shader formats; None on tier 0.

C#
public ShaderFormat ShaderFormats { get; init; }

Property Value

ShaderFormat

Tier

Tier.

C#
public GraphicsTier Tier { get; init; }

Property Value

GraphicsTier

Methods

<Clone>$()

C#
public GraphicsCapabilities <Clone>$()

Returns

GraphicsCapabilities

Deconstruct(out string, out GraphicsTier, out GraphicsFeatures, out ShaderFormat, out IReadOnlyDictionary<TextureFormat, TextureUsage>, out IReadOnlySet<BlendState>, out IReadOnlySet<PresentMode>, out GraphicsLimits, out string, out string?)

C#
public void Deconstruct(out string Backend, out GraphicsTier Tier, out GraphicsFeatures Features, out ShaderFormat ShaderFormats, out IReadOnlyDictionary<TextureFormat, TextureUsage> Formats, out IReadOnlySet<BlendState> BuiltInBlendStates, out IReadOnlySet<PresentMode> PresentModes, out GraphicsLimits Limits, out string ApiName, out string? Adapter)

Parameters

Backend string

Tier GraphicsTier

Features GraphicsFeatures

ShaderFormats ShaderFormat

Formats IReadOnlyDictionary<TextureFormat, TextureUsage>

BuiltInBlendStates IReadOnlySet<BlendState>

PresentModes IReadOnlySet<PresentMode>

Limits GraphicsLimits

ApiName string

Adapter string?

Equals(object?)

C#
public override bool Equals(object? obj)

Parameters

obj object?

Returns

bool

Equals(GraphicsCapabilities?)

C#
public bool Equals(GraphicsCapabilities? other)

Parameters

other GraphicsCapabilities?

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

Has(GraphicsFeatures)

True when every flag of features is declared.

C#
public bool Has(GraphicsFeatures features)

Parameters

features GraphicsFeatures

Returns

bool

Supports(TextureFormat, TextureUsage)

True when format supports every flag of usage.

C#
public bool Supports(TextureFormat format, TextureUsage usage)

Parameters

format TextureFormat

usage TextureUsage

Returns

bool

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(GraphicsCapabilities?, GraphicsCapabilities?)

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

Parameters

left GraphicsCapabilities?

right GraphicsCapabilities?

Returns

bool

operator !=(GraphicsCapabilities?, GraphicsCapabilities?)

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

Parameters

left GraphicsCapabilities?

right GraphicsCapabilities?

Returns

bool