Class GameContextFactory
Given a AppContextType creates the corresponding GameContext instance based on the current executing platform.
public static class GameContextFactory
- Inheritance
-
objectGameContextFactory
Properties
SDLBackendEnabled
Whether the SDL windowing backend is available. Set the "Stride.Games.SDLBackendEnabled" feature switch
to false to let trimming/AOT drop GameContextSDL and the SDL windowing dependency.
[FeatureSwitchDefinition("Stride.Games.SDLBackendEnabled")]
public static bool SDLBackendEnabled { get; }
Property Value
WinFormsBackendEnabled
Whether the Windows Forms windowing backend is available. Set the "Stride.Games.WinFormsBackendEnabled"
feature switch to false to let trimming/AOT drop GameContextWinforms and System.Windows.Forms.
[FeatureSwitchDefinition("Stride.Games.WinFormsBackendEnabled")]
public static bool WinFormsBackendEnabled { get; }
Property Value
Methods
NewGameContext(AppContextType, int, int, bool)
Given a type create the appropriate game Context for the current executing platform.
public static GameContext NewGameContext(AppContextType type, int requestedWidth = 0, int requestedHeight = 0, bool isUserManagingRun = false)
Parameters
typeAppContextTyperequestedWidthintrequestedHeightintisUserManagingRunbool
Returns
NewGameContextAndroid()
public static GameContext NewGameContextAndroid()
Returns
NewGameContextDesktop(int, int, bool)
public static GameContext NewGameContextDesktop(int requestedWidth = 0, int requestedHeight = 0, bool isUserManagingRun = false)
Parameters
Returns
NewGameContextSDL(int, int, bool)
public static GameContext NewGameContextSDL(int requestedWidth = 0, int requestedHeight = 0, bool isUserManagingRun = false)
Parameters
Returns
NewGameContextUWPCoreWindow(int, int)
public static GameContext NewGameContextUWPCoreWindow(int requestedWidth = 0, int requestedHeight = 0)
Parameters
Returns
NewGameContextUWPXaml(int, int)
public static GameContext NewGameContextUWPXaml(int requestedWidth = 0, int requestedHeight = 0)
Parameters
Returns
NewGameContextWpf(int, int, bool)
public static GameContext NewGameContextWpf(int requestedWidth = 0, int requestedHeight = 0, bool isUserManagingRun = false)
Parameters
Returns
NewGameContextiOS()
public static GameContext NewGameContextiOS()