Class StartupConfig
Holds the start up properties for a Yak2D application
Inheritance
Namespace: Yak2D
Assembly: Yak2D.Api.dll
Syntax
public class StartupConfig : object
Properties
AutoClearMainWindowColourEachFrame
Sets whether before each draw iteration, the main window render target's colour buffer (texture) is cleared to transparent black (0,0,0,0)
Declaration
public bool AutoClearMainWindowColourEachFrame { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
AutoClearMainWindowDepthEachFrame
Sets whether before each draw iteration, the main window render target's depth buffer is cleared (helps avoid situations where this is forgotten)
Declaration
public bool AutoClearMainWindowDepthEachFrame { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
AvoidVulkanWherePossible
If SystemDefault is selected, this toggle can be used to avoid Vulkan unless it is the only system option
Declaration
public bool AvoidVulkanWherePossible { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
FixedOrSmallestUpdateTimeStepInSeconds
If a fixed update period type is chosen, this defines the time slice in seconds of each update. Should a variable update period be chosen, this defines the smallest time interval to process an update for
Declaration
public float FixedOrSmallestUpdateTimeStepInSeconds { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
FontFolder
The root folder (either on disk or as an embedded resource location) for the user font data (.fnt files and related .png's)
Declaration
public string FontFolder { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
FpsCalculationUpdatePeriod
The period in seconds over which the update and draw loop 'frames per second' are calculated
Declaration
public float FpsCalculationUpdatePeriod { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
PreferredGraphicsApi
Sets preferred graphics API. Unsupported APIs for the runtime system will be ignored and a system default will be chosen
Declaration
public GraphicsApi PreferredGraphicsApi { get; set; }
Property Value
| Type | Description |
|---|---|
| GraphicsApi |
ProcessFractionalUpdatesBeforeDraw
Sets whether when ready to draw, the engine does a 'catch up' update iteration to bring current system evolution closer to realtime
Declaration
public bool ProcessFractionalUpdatesBeforeDraw { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
RequireAtleastOneUpdatePerDraw
Sets whether at least one update iteration is required before starting a new draw
Declaration
public bool RequireAtleastOneUpdatePerDraw { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
SyncToVerticalBlank
Render updates wait for monitor vertical sync (to avoid screen tearing)
Declaration
public bool SyncToVerticalBlank { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
TextureFolderRootName
The root folder (either on disk or as an embedded resource location) for the user texture files (.png)
Declaration
public string TextureFolderRootName { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
UpdatePeriodType
Defines the time period slicing for framework update calls. Framework update and draw iterations are on different loop cycles
Declaration
public UpdatePeriod UpdatePeriodType { get; set; }
Property Value
| Type | Description |
|---|---|
| UpdatePeriod |
WindowHeight
Sets window height in pixels, aswell as the height of the main window swapchain backbuffer (main render surface)
Declaration
public int WindowHeight { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
WindowIsResizable
Sets whether the window is resizable (can be changed during application runtime)
Declaration
public bool WindowIsResizable { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
WindowPositionX
Sets X component of top-left position of window
Declaration
public int WindowPositionX { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
WindowPositionY
Sets Y component of top-left position of window
Declaration
public int WindowPositionY { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
WindowState
Sets start up window state
Declaration
public DisplayState WindowState { get; set; }
Property Value
| Type | Description |
|---|---|
| DisplayState |
WindowTitle
Sets the window title bar text
Declaration
public string WindowTitle { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
WindowWidth
Sets window width in pixels, aswell as the width of the main window swapchain backbuffer (main render surface)
Declaration
public int WindowWidth { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
Methods
Default(UInt32, UInt32, String, Boolean)
Provides some default configuration settings Texture and Font folders are set to "Textures" and "Fonts" respectively
Declaration
public static StartupConfig Default(uint windowWidth, uint windowHeight, string windowTitle, bool fullScreen)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | windowWidth | Horizontal Window Resolution |
| System.UInt32 | windowHeight | Vertical Window Resolution |
| System.String | windowTitle | Window Title |
| System.Boolean | fullScreen | Start the application in fullscreen |
Returns
| Type | Description |
|---|---|
| StartupConfig |