Page MenuHomePhabricator

Application Configuration
Updated 954 Days AgoPublic

The Application class takes care of a lot of the common work an application might do for initialisation. For initialisation it can be given the name of a configuration file which will be loaded to get the settings for the application. If you prefer you can initialise using a Configuration object directly rather than loading the configuration from a file.

The following is a list of configuration options that you can use and what each does.

Depending on the complexity of your application you may end up with a configuration file for each platform you target. This is because the configuration file might contain platform specific options or need to have different values for each platforms.

OptionTypeValid valuesDescription
networkbool1, 0Defines whether to initialise the network manager
network.update-modestringkernel, network.events, noneThe network manager update mode
network.redirect-coutstringconnection information string. For example direct:127.0.0.1:20154The server to redirect cout to
network.redirect-cout.reconnect-timefloatanyThe number of seconds to wait before attempting a reconnect if the connection is dropped.
network.redirect-cout.dual-localbool1, 0if true and redirection is set up output will go to the local stream before redirection as well.
resolution.xu32anyThe x resolution of the default render target.
resolution.yu32anyThe y resolution of the default render target.
fullscreenbool1, 0Flag to indicate that the default render target should be made full screen. This feature depends on support on the target platform.
window.titlestringanyThe title of the default render target window. This value may not be used on some platforms.
audiostringDefault or platform specific valueThe audio system to use. If not specified the default will be used.
render.targetstringPlatform specific valueWhen specified the application will attempt to create a render target using a bound factory method. Typically platforms support "Window(x,y,bitdepth,fullscreenflag)" but this isn't guaranteed. This option can be specified multiple times to create multiple render targets.
material.liststringfile nameA file containing a list of material resources to load.
texture.liststringfile nameA file containing a list of text resources to load. The texture manager doesn't explicitly need a texture list as it accepts file names as resource names and will load it if the resource hasn't been specified before hand.
skeleton.liststringfile nameA file containing a list of skeleton resources to load.
mesh.liststringfile nameA file containing a list of mesh resources to load.
font.liststringfile nameA file containing a list of font resources to load.
vertex.shader.liststringfile nameA file containing a list of vertex shader resources to load.
fragment.shader.liststringfile nameA file containing a list of fragment shader resources to load.
kernel.pause-hintbool1, 0, true or falseCorresponds to Kernel::SetPauseHint() When true it tells Application that it should pause when focus is lost in windows systems. This does not have an effect on some platforms. Defaults to false.
kernel.frame-time.minSecondsfloating point numbers representing secondsThe minimum time the kernel should take per frame. Setting value can be useful for saving processing and battery power. If your frame time is less than this value the process will sleep for a short period of time so the CPU can perform other work (or save power). The default value is 0.01666667 which approximates to 60 frame per second.
kernel.frame-time.max-deltaSecondsfloating point numbers representing secondsThe maximum time the kernel will use as the lastFrameTime in Task updates. This value does not limit the time a frame can process, only the upper value that Tasks can receive as a parameter in their Update() method. The default value for this option is 1 second
kernel.frame-rate.fpsintegerany values greater than 0The number of frames per second that the kernel is expected to run at. This can be used as an alternative way to set kernel.frame-time.min since it might be a more natural way for some people to think about frame time limits. If both this option and kernel.frame-time.min are present, kernel.frame-time.min will take priority.
audio.player.liststringfile nameA file that lists the resources for the Application's AudioPlayer instance.
Last Author
0xseantasker
Last Edited
Sep 15 2021, 7:33 PM

Event Timeline

0xseantasker edited the content of this document. (Show Details)
0xseantasker edited the content of this document. (Show Details)
0xseantasker changed the visibility from "All Users" to "Public (No Login Required)".