NativeHandleFlags

Description

[Flags]
enum Tinman.Engine.Application.NativeHandleFlags

Enumeration of native window handle flags.

This enumeration is a bitflag which encodes both the native handle type (see Type) and the feature set (see Feature).

The handle type may be used at runtime to decide which platform-dependent APIs to use, for example in order to create an OpenGL context or a Vulkan instance.

Public / Constants

None

public constant None → (0:int32)

No type and feature flags.

Type_Unspecified

public constant Type_Unspecified → (1:int32)

The native window handle type is left unspecified.

The documentation of the class that implements the INativeWindow interface or the abstract RenderContext class should provide information about how to interpret the native window handle, which implies that code using Type_Unspecified will work only with that concrete class.

Type_WinAPI

public constant Type_WinAPI → (2:int32)

Native handle values of the Windows API
https://docs.microsoft.com/en-us/windows/win32/api

INativeWindow : HWND
RenderContext : HGLRC

Type_Wayland

public constant Type_Wayland → (4:int32)

Native handle values of the Wayland API
https://wayland.freedesktop.org/

INativeWindow : wl_surface*
RenderContext : ?

Type_X11

public constant Type_X11 → (8:int32)

Native handle values of the X11 API
https://x.org/wiki/

Type_MacOS

public constant Type_MacOS → (16:int32)

Native handle values of the macOS API
https://developer.apple.com/documentation/appkit/

INativeWindow : NSWindow
RenderContext : ?

Type_SDL2

public constant Type_SDL2 → (32:int32)

Native handle values of the Simple DirectMedia Layer 2
https://wiki.libsdl.org/SDL2/

INativeWindow : SDL_Window*
RenderContext : SDL_GLContext

Type_SDL3

public constant Type_SDL3 → (64:int32)

Native handle values of the Simple DirectMedia Layer 3
https://wiki.libsdl.org/SDL3/

INativeWindow : SDL_Window*
RenderContext : SDL_GLContext

Feature_Direct3D_9

public constant Feature_Direct3D_9 → (65536:int32)

The native window supports rendering via Direct3D 9.

Feature_Direct3D_11

public constant Feature_Direct3D_11 → (131072:int32)

The native window supports rendering via Direct3D 11.

Feature_Direct3D_12

public constant Feature_Direct3D_12 → (262144:int32)

The native window supports rendering via Direct3D 12.

Feature_OpenGL

public constant Feature_OpenGL → (524288:int32)

The native window supports creation of an GLApi.OpenGL render context.

Feature_OpenGLES

public constant Feature_OpenGLES → (1048576:int32)

The native window supports creation of an GLApi.OpenGLES render context.

Feature_Vulkan

public constant Feature_Vulkan → (2097152:int32)

The native window supports rendering via Vulkan.

Feature_Metal

public constant Feature_Metal → (4194304:int32)

The native window supports rendering via Metal.

Any

public constant Any → (8323199:int32)

Any native handle type and feature flag.