Show / Hide Table of Contents

Class StartupConfig

Holds the start up properties for a Yak2D application

Inheritance
object
StartupConfig
Inherited Members
object.GetType()
object.MemberwiseClone()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: Yak2D
Assembly: Yak2D.Api.dll
Syntax
public class StartupConfig

Constructors

StartupConfig()

Declaration
public StartupConfig()

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
bool

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
bool

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
bool

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
float

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
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
float

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
bool

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
bool

SyncToVerticalBlank

Render updates wait for monitor vertical sync (to avoid screen tearing)

Declaration
public bool SyncToVerticalBlank { get; set; }
Property Value
Type Description
bool

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
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
int

WindowIsResizable

Sets whether the window is resizable (can be changed during application runtime)

Declaration
public bool WindowIsResizable { get; set; }
Property Value
Type Description
bool

WindowPositionX

Sets X component of top-left position of window

Declaration
public int WindowPositionX { get; set; }
Property Value
Type Description
int

WindowPositionY

Sets Y component of top-left position of window

Declaration
public int WindowPositionY { get; set; }
Property Value
Type Description
int

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
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
int

Methods

Default(uint, uint, string, bool)

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
uint windowWidth

Horizontal Window Resolution

uint windowHeight

Vertical Window Resolution

string windowTitle

Window Title

bool fullScreen

Start the application in fullscreen

Returns
Type Description
StartupConfig
In this article
Back to top yak2D - Alex Paterson