KernelAPI reference
Class GraphicsSettings
Namespace: MicroEngine.Core
Assembly: MicroEngine.dll
Guide: Game lifecycle and time
The graphics options a game starts with (Graphics). Every option has a sensible automatic
default; the launcher’s options (–platform, –renderer, –vsync, –fps-limit, –gpu,
–window, –display) override them for one run, and Screen changes the ones a platform
can change while the game runs. A game that offers a graphics menu saves Current and returns
it from Settings at its next start. VSync, the frame limit and UpdateRate
are independent: VSync waits for the display, the limit caps frames per second, the update rate is the simulation’s.
public sealed record GraphicsSettings : IEquatable<GraphicsSettings>Inheritance
Implements
Constructors
GraphicsSettings()
public GraphicsSettings()Properties
Backend
The platform to run on first (“sdl”, “raylib”, “sdl-software”…); null tries the catalog in order. A platform that cannot start here falls back to the next one, saying why; a platform named on the command line does not. Read at start only.
public string? Backend { get; init; }Property Value
Device
The graphics device to draw with, on platforms that offer more than one (GraphicsDevices):
SDL offers “sdl-renderer” (its default, tier 0) and “sdl-gpu” (tier 1: custom shaders, depth, the 3D path). Null
(the default) keeps the platform’s default device. A platform that does not offer the named device refuses to start
with PlatformConfigurationException, and one that offers it but cannot open it here says why; the
game never runs on another device silently. The launcher’s –graphics overrides it. Read at start only.
public string? Device { get; init; }Property Value
Display
The display to open on (an index of Displays); null lets the system choose. An index the system does not have is ignored.
public int? Display { get; init; }Property Value
int?
FrameRateLimit
The most frames per second to draw; 0 (the default) sets no limit. Independent of VSync: with VSync off it paces frames on its own; with VSync on, a limit below the display’s rate skips refreshes (choose a divisor of the display’s rate, or draw with FrameBlend). Not applied to fixed-step (scripted) runs.
public int FrameRateLimit { get; init; }Property Value
Gpu
Which GPU to ask for on a machine with two (GpuPreference). Read at start only.
public GpuPreference Gpu { get; init; }Property Value
Renderers
Graphics APIs to try in order on platforms that offer several (SDL: “direct3d11”, “direct3d12”, “vulkan”, “opengl”, “metal”, “gpu”…); after them, the platform chooses as when the list is empty (the default). Names the system lacks are skipped. Read at start only.
public IReadOnlyList<string> Renderers { get; init; }Property Value
VSync
Whether frames wait for the display’s refresh (true by default): no tearing, and frames paced to the display.
public bool VSync { get; init; }Property Value
WindowMode
Windowed (the default), borderless full screen, or exclusive full screen. Phones and browsers decide this themselves.
public WindowMode WindowMode { get; init; }Property Value
Methods
<Clone>$()
public GraphicsSettings <Clone>$()Returns
Equals(object?)
public override bool Equals(object? obj)Parameters
obj object?
Returns
Equals(GraphicsSettings?)
public bool Equals(GraphicsSettings? other)Parameters
other GraphicsSettings?
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(GraphicsSettings?, GraphicsSettings?)
public static bool operator ==(GraphicsSettings? left, GraphicsSettings? right)Parameters
left GraphicsSettings?
right GraphicsSettings?
Returns
operator !=(GraphicsSettings?, GraphicsSettings?)
public static bool operator !=(GraphicsSettings? left, GraphicsSettings? right)Parameters
left GraphicsSettings?
right GraphicsSettings?