mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-10-26 08:08:28 +03:00
ecode: Disable vsync by default.
This commit is contained in:
@@ -109,7 +109,8 @@ class EE_API Engine {
|
||||
@param ini The ini file instance
|
||||
@param iniKeyName The ini key name to search the properties
|
||||
*/
|
||||
ContextSettings createContextSettings( IniFile* ini, std::string iniKeyName = "EEPP" );
|
||||
ContextSettings createContextSettings( IniFile* ini, std::string iniKeyName = "EEPP",
|
||||
bool vsyncEnabledByDefault = true );
|
||||
|
||||
/** Enabling Shared GL Context allows asynchronous OpenGL resource loading ( only if is
|
||||
*supported by the backend and the OS, SDL 2 backend is the only one supported ). * If the
|
||||
|
||||
@@ -319,12 +319,13 @@ WindowSettings Engine::createWindowSettings( std::string iniPath, std::string in
|
||||
return createWindowSettings( &Ini, iniKeyName );
|
||||
}
|
||||
|
||||
ContextSettings Engine::createContextSettings( IniFile* ini, std::string iniKeyName ) {
|
||||
ContextSettings Engine::createContextSettings( IniFile* ini, std::string iniKeyName,
|
||||
bool vsyncEnabledByDefault ) {
|
||||
eeASSERT( NULL != ini );
|
||||
|
||||
ini->readFile();
|
||||
|
||||
bool VSync = ini->getValueB( iniKeyName, "vsync", true );
|
||||
bool VSync = ini->getValueB( iniKeyName, "vsync", vsyncEnabledByDefault );
|
||||
std::string GLVersion = ini->getValue( iniKeyName, "glversion", "0" );
|
||||
int depthBufferSize = ini->getValueI( iniKeyName, "depthbuffersize", 24 );
|
||||
int stencilBufferSize = ini->getValueI( iniKeyName, "stencilbuffersize", 1 );
|
||||
|
||||
@@ -2900,7 +2900,7 @@ void App::init( const LogLevel& logLevel, std::string file, const Float& pidelDe
|
||||
winSettings.Icon = mResPath + winSettings.Icon;
|
||||
}
|
||||
|
||||
mConfig.context = engine->createContextSettings( &mConfig.ini, "window" );
|
||||
mConfig.context = engine->createContextSettings( &mConfig.ini, "window", false );
|
||||
mConfig.context.SharedGLContext = true;
|
||||
|
||||
mWindow = engine->createWindow( winSettings, mConfig.context );
|
||||
|
||||
Reference in New Issue
Block a user