Interface IWindowingDriver
Represents a windowing driver used to specify the windowing backend in Window<TDriver> and Display<TDriver>
public interface IWindowingDriver
Remarks
There are some pre-defined windowing drivers that SDL comes with. Not all of them are necessarily available in every environment. You can check the AvailableDriverNames property to see which windowing drivers are available in the current environment. The windowing drivers that SDL comes with are:
- CocoaCocoa backend (only available on Apple platforms)
- X11X11 backend (only available on platforms that support the X11 display server protocol)
- WaylandWayland backend (only available on platforms that support the Wayland display server protocol)
- VivanteVivante EGL backend
- WindowsWindows backend (only available on Windows platforms)
- HaikuHaiku backend (only available on Haiku OS platforms)
- UIKitUIKit backend (only available on Apple platforms)
- AndroidAndroid backend (only available on Android platforms)
- PlayStation2Sony PlayStation 2 backend
- PlayStationPortableSony PlayStation Portable backend
- PlayStationVitaSony PlayStation Vita backend
- N3DSNintendo 3DS backend
- NGageNokia N-Gage backend
- KmsDrmLinux KMS/DRM backend (only available on Linux platforms with Kernel Mode Setting (KMS) and Direct Rendering Manager (DRM) support)
- RiscOSRISC OS backend (only available on RISC OS platforms)
- RaspberryPiRaspberry Pi backend (only available on Raspberry Pi platforms)
- EmscriptenEmscripten backend (only available on platforms that support Emscripten)
- QnxQNX backend (only available on QNX platforms)
- Offscreen"Offscreen-video" backend
- Dummy"Dummy video" (sometimes called "null video") backend
- DummyEvdev"Dummy video" (sometimes called "null video") backend with evdev (only available on platforms that support evdev)
Please note that some of these windowing drivers require platforms that .NET doesn't run on (yet). These drivers are currently unsupported (e.g. NGage, etc.).
Properties
AvailableDriverNames
Gets the list of names of available windowing drivers in the loaded build of SDL
public static ImmutableArray<string> AvailableDriverNames { get; }
Property Value
- ImmutableArray<string>
The list of names of available windowing drivers in the loaded build of SDL
Remarks
The list of available windowing drivers is only retrieved once and then cached afterwards, so the value of this property won't change during the lifetime of the application.
The list is in the order that windowing drivers are normally checked during the initialization of SDL's video subsystem.
The names of all pre-defined windowing drivers are all simple, low-ASCII identifiers, like "cocoa", "x11" or "windows". These never have Unicode characters, and are not meant to be proper names.
You can use the value of the Name properties of individual windowing drivers types (e.g. Name) to check for the availability of a certain windowing driver; alternatively you can check the Sdl3Sharp.Video.Windowing.Drivers.WindowingDriverExtensions.get_IsAvailable<TDriver>() property for that.
This property should only be accessed from the main thread.
CurrentDriverName
Gets the name of the currently initialized windowing driver
public static string? CurrentDriverName { get; }
Property Value
- string
The name of the currently initialized windowing driver, or
nullif no windowing driver has been initialized (e.g. SDL's video subsystem is not initialized)
Remarks
The value of this property is contained in the list of AvailableDriverNames, if it's not null;
otherwise, it means no windowing driver has been initialized (e.g. SDL's video subsystem is not initialized).
This property should only be accessed from the main thread.
Name
Gets the name of the windowing driver
public static abstract string? Name { get; }
Property Value
- string
The name of the windowing driver, or
nullif the driver doesn't have a name (although all pre-defined windowing drivers do have a non-nullname)
Remarks
The names of all pre-defined windowing drivers are all simple, low-ASCII identifiers, like "cocoa", "x11" or "windows". These never have Unicode characters, and are not meant to be proper names.