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.
public sealed record GraphicsCapabilities : IEquatable<GraphicsCapabilities>Inheritance
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.
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.
public string? Adapter { get; init; }Property Value
ApiName
Underlying API as reported after creation (“direct3d11”, “direct3d12”, “vulkan”, …).
public string ApiName { get; init; }Property Value
Backend
The factory name (“sdl-renderer”, “sdl-gpu”, …); Device.
public string Backend { get; init; }Property Value
BuiltInBlendStates
Blend states the built-in pipelines support; always contains Presets.
public IReadOnlySet<BlendState> BuiltInBlendStates { get; init; }Property Value
Features
Declared optional features.
public GraphicsFeatures Features { get; init; }Property Value
Formats
Usages each texture format supports; a format absent from the map supports nothing.
public IReadOnlyDictionary<TextureFormat, TextureUsage> Formats { get; init; }Property Value
IReadOnlyDictionary<TextureFormat, TextureUsage>
Limits
Limits.
public GraphicsLimits Limits { get; init; }Property Value
PresentModes
Present modes the surface supports (empty without a surface).
public IReadOnlySet<PresentMode> PresentModes { get; init; }Property Value
ShaderFormats
Accepted shader formats; None on tier 0.
public ShaderFormat ShaderFormats { get; init; }Property Value
Tier
Tier.
public GraphicsTier Tier { get; init; }Property Value
Methods
<Clone>$()
public GraphicsCapabilities <Clone>$()Returns
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?)
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?)
public override bool Equals(object? obj)Parameters
obj object?
Returns
Equals(GraphicsCapabilities?)
public bool Equals(GraphicsCapabilities? other)Parameters
other GraphicsCapabilities?
Returns
GetHashCode()
public override int GetHashCode()Returns
Has(GraphicsFeatures)
True when every flag of features is declared.
public bool Has(GraphicsFeatures features)Parameters
features GraphicsFeatures
Returns
Supports(TextureFormat, TextureUsage)
True when format supports every flag of usage.
public bool Supports(TextureFormat format, TextureUsage usage)Parameters
format TextureFormat
usage TextureUsage
Returns
ToString()
public override string ToString()Returns
Operators
operator ==(GraphicsCapabilities?, GraphicsCapabilities?)
public static bool operator ==(GraphicsCapabilities? left, GraphicsCapabilities? right)Parameters
left GraphicsCapabilities?
right GraphicsCapabilities?
Returns
operator !=(GraphicsCapabilities?, GraphicsCapabilities?)
public static bool operator !=(GraphicsCapabilities? left, GraphicsCapabilities? right)Parameters
left GraphicsCapabilities?
right GraphicsCapabilities?