Table of Contents

Class GameContextFactory

Namespace
Stride.Games
Assembly
Stride.Games.dll

Given a AppContextType creates the corresponding GameContext instance based on the current executing platform.

public static class GameContextFactory
Inheritance
object
GameContextFactory

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

bool

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

bool

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

type AppContextType
requestedWidth int
requestedHeight int
isUserManagingRun bool

Returns

GameContext

NewGameContextAndroid()

public static GameContext NewGameContextAndroid()

Returns

GameContext

NewGameContextDesktop(int, int, bool)

public static GameContext NewGameContextDesktop(int requestedWidth = 0, int requestedHeight = 0, bool isUserManagingRun = false)

Parameters

requestedWidth int
requestedHeight int
isUserManagingRun bool

Returns

GameContext

NewGameContextSDL(int, int, bool)

public static GameContext NewGameContextSDL(int requestedWidth = 0, int requestedHeight = 0, bool isUserManagingRun = false)

Parameters

requestedWidth int
requestedHeight int
isUserManagingRun bool

Returns

GameContext

NewGameContextUWPCoreWindow(int, int)

public static GameContext NewGameContextUWPCoreWindow(int requestedWidth = 0, int requestedHeight = 0)

Parameters

requestedWidth int
requestedHeight int

Returns

GameContext

NewGameContextUWPXaml(int, int)

public static GameContext NewGameContextUWPXaml(int requestedWidth = 0, int requestedHeight = 0)

Parameters

requestedWidth int
requestedHeight int

Returns

GameContext

NewGameContextWpf(int, int, bool)

public static GameContext NewGameContextWpf(int requestedWidth = 0, int requestedHeight = 0, bool isUserManagingRun = false)

Parameters

requestedWidth int
requestedHeight int
isUserManagingRun bool

Returns

GameContext

NewGameContextiOS()

public static GameContext NewGameContextiOS()

Returns

GameContext