nCine  2025.04.r498-9d36345
A cross-platform 2D game engine
Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
ncine::AppConfiguration Class Reference

The class storing initialization settings for an nCine application. More...

#include <AppConfiguration.h>

Collaboration diagram for ncine::AppConfiguration:
Collaboration graph
[legend]

Public Member Functions

 AppConfiguration ()
 Default constructor setting the defaults.
 
const nctl::StringdataPath () const
 
nctl::StringdataPath ()
 
bool glCoreProfile () const
 
bool glForwardCompatible () const
 
unsigned int glMajorVersion () const
 
unsigned int glMinorVersion () const
 
float profileTextUpdateTime () const
 
int argc () const
 
const char * argv (int index) const
 

Public Attributes

nctl::String logFile
 The path for the log file.
 
ILogger::LogLevel consoleLogLevel
 The logging level for messages printed on the console.
 
ILogger::LogLevel fileLogLevel
 The logging level for messages written in the log file.
 
float frameTimerLogInterval
 The interval for frame timer accumulation average and log.
 
Vector2i resolution
 The window size or the resolution of the closest video mode if going full screen. More...
 
float refreshRate
 The refresh rate of the screen mode used to go in full screen. More...
 
Vector2i windowPosition
 The window position coordinates in the virtual screen made of all the connected monitors. More...
 
bool fullScreen
 The flag is true if the application is going to be in full screen mode.
 
bool resizable
 The flag is true if the window is going to be resizable.
 
bool windowScaling
 The flag is true if the window size is automatically scaled according to the display factor.
 
unsigned int frameLimit
 The maximum number of frames to render per second or 0 for no limit.
 
nctl::String windowTitle
 The window title.
 
nctl::String windowIconFilename
 The window icon filename.
 
bool useBufferMapping
 The flag is true if mapping is used to update OpenGL buffers.
 
bool deferShaderQueries
 The flag is true when error checking and introspection of shader programs are deferred to first use. More...
 
unsigned int fixedBatchSize
 Fixed size of render commands to be collected for batching on Emscripten and ANGLE. More...
 
bool useBinaryShaderCache
 The flag is true if the shader cache is enabled to load and save binary shader programs. More...
 
nctl::String shaderCacheDirname
 The directory name (not the complete path) for the binary shaders cache.
 
bool compileBatchedShadersTwice
 The flag is true if, on devices with UBOs smaller than 64 KB, batched shaders will be compiled twice to identify their maximum batch size. More...
 
unsigned long vboSize
 The maximum size in bytes for each VBO collecting geometry data.
 
unsigned long iboSize
 The maximum size in bytes for each IBO collecting index data.
 
unsigned int vaoPoolSize
 The maximum size for the pool of VAOs.
 
unsigned int renderCommandPoolSize
 The initial size for the pool of render commands.
 
unsigned int outputAudioFrequency
 The output frequency of the audio system. More...
 
unsigned int monoAudioSources
 The number of mono audio sources. More...
 
unsigned int stereoAudioSources
 The number of stereo audio sources. More...
 
bool withDebugOverlay
 The flag is true if the debug overlay is enabled.
 
bool withAudio
 The flag is true if the audio subsystem is enabled.
 
bool withThreads
 The flag is true if the threading subsystem is enabled.
 
bool withScenegraph
 The flag is true if the scenegraph based rendering is enabled.
 
bool withVSync
 The flag is true if the vertical synchronization is enabled.
 
bool withGlDebugContext
 The flag is true if the OpenGL debug context is enabled.
 
bool withConsoleColors
 The flag is true if console log messages should use colors.
 

Static Public Attributes

static const int WindowPositionIgnore = 2147483647
 

Friends

class PCApplication
 

Detailed Description

The class storing initialization settings for an nCine application.

Member Function Documentation

◆ argc()

int ncine::AppConfiguration::argc ( ) const
inline
Returns
The number of arguments passed on the command line

◆ argv()

const char * ncine::AppConfiguration::argv ( int  index) const
Returns
The selected argument from the ones passed on the command line

◆ dataPath() [1/2]

nctl::String & ncine::AppConfiguration::dataPath ( )
Returns
The path for the application to load data from

Allows to set the value of the static field FileSystem::dataPath_.

◆ dataPath() [2/2]

const nctl::String & ncine::AppConfiguration::dataPath ( ) const
Returns
The path for the application to load data from

◆ glCoreProfile()

bool ncine::AppConfiguration::glCoreProfile ( ) const
inline
Returns
True if the OpenGL profile is going to be core

◆ glForwardCompatible()

bool ncine::AppConfiguration::glForwardCompatible ( ) const
inline
Returns
True if the OpenGL context is going to be forward compatible

◆ glMajorVersion()

unsigned int ncine::AppConfiguration::glMajorVersion ( ) const
inline
Returns
The major version number of the OpenGL context

◆ glMinorVersion()

unsigned int ncine::AppConfiguration::glMinorVersion ( ) const
inline
Returns
The minor version number of the OpenGL context

◆ profileTextUpdateTime()

float ncine::AppConfiguration::profileTextUpdateTime ( ) const
inline
Returns
The update time in seconds for the profile text nodes

Member Data Documentation

◆ compileBatchedShadersTwice

bool ncine::AppConfiguration::compileBatchedShadersTwice

The flag is true if, on devices with UBOs smaller than 64 KB, batched shaders will be compiled twice to identify their maximum batch size.

Note
When enabled, compatibility with such devices will increase because shaders with standard batch size will not compile

◆ deferShaderQueries

bool ncine::AppConfiguration::deferShaderQueries

The flag is true when error checking and introspection of shader programs are deferred to first use.

Note
The value is only taken into account when the scenegraph is being used

◆ fixedBatchSize

unsigned int ncine::AppConfiguration::fixedBatchSize

Fixed size of render commands to be collected for batching on Emscripten and ANGLE.

Note
Increasing this value too much might negatively affect batching shaders compilation time. A value of zero restores the default behavior of non fixed size for batches.
Warning
If this value is changed, the binary shader cache needs to be manually cleared.

◆ monoAudioSources

unsigned int ncine::AppConfiguration::monoAudioSources

The number of mono audio sources.

Note
Set this value to zero to request the default number of mono audio sources.

◆ outputAudioFrequency

unsigned int ncine::AppConfiguration::outputAudioFrequency

The output frequency of the audio system.

Note
Set this value to zero for the default output frequency of the device.

◆ refreshRate

float ncine::AppConfiguration::refreshRate

The refresh rate of the screen mode used to go in full screen.

Note
If it is zero or negative, when requesting a full screen mode the current refresh rate will not be changed.

◆ resolution

Vector2i ncine::AppConfiguration::resolution

The window size or the resolution of the closest video mode if going full screen.

Note
If either x or y are zero or negative, the application will go in full screen at the current screen resolution.

◆ stereoAudioSources

unsigned int ncine::AppConfiguration::stereoAudioSources

The number of stereo audio sources.

Note
Set this value to zero to request the default number of stereo audio sources.

◆ useBinaryShaderCache

bool ncine::AppConfiguration::useBinaryShaderCache

The flag is true if the shader cache is enabled to load and save binary shader programs.

Note
Even if the flag is true the functionality might still not be supported by the OpenGL context

◆ windowPosition

Vector2i ncine::AppConfiguration::windowPosition

The window position coordinates in the virtual screen made of all the connected monitors.

Note
It can also be used to go full screen on a monitor that is not the primary one of the system.
The WindowPositionIgnore value can be used in either or both dimensions when a specific position is not needed.

The documentation for this class was generated from the following files: