diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2011-08-13 00:53:29 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2011-08-13 00:53:29 +0400 |
commit | c5ef9b62c1f7f407c42bb48fe3362fa6cf3cf101 (patch) | |
tree | 9afdf70a114361c230517cf57569ebe26e1a274e /source/gameengine/GamePlayer/ghost/GPG_Application.cpp | |
parent | 83f0c6e56991f1312598b013a2972e3dc79d8e09 (diff) |
BGE Animations: Adding an option to let users choose whether or not to lock animation updates to the framerate. If this option is enabled, animations are only updated at the same speed as the animation framerate. This can give a significant speed up in performance, but at the cost of smoothness in animations. I'm defaulting this behavior to off for now, which is the behavior seen in trunk.
Diffstat (limited to 'source/gameengine/GamePlayer/ghost/GPG_Application.cpp')
-rw-r--r-- | source/gameengine/GamePlayer/ghost/GPG_Application.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp index f2b322084ed..1c6d3efc318 100644 --- a/source/gameengine/GamePlayer/ghost/GPG_Application.cpp +++ b/source/gameengine/GamePlayer/ghost/GPG_Application.cpp @@ -545,6 +545,7 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode) bool frameRate = (SYS_GetCommandLineInt(syshandle, "show_framerate", 0) != 0); bool useLists = (SYS_GetCommandLineInt(syshandle, "displaylists", gm->flag & GAME_DISPLAY_LISTS) != 0); bool nodepwarnings = (SYS_GetCommandLineInt(syshandle, "ignore_deprecation_warnings", 1) != 0); + bool restrictAnimFPS = gm->flag & GAME_RESTRICT_ANIM_UPDATES; if(GLEW_ARB_multitexture && GLEW_VERSION_1_1) m_blendermat = (SYS_GetCommandLineInt(syshandle, "blender_material", 1) != 0); @@ -627,6 +628,7 @@ bool GPG_Application::initEngine(GHOST_IWindow* window, const int stereoMode) m_ketsjiengine->SetUseFixedTime(fixed_framerate); m_ketsjiengine->SetTimingDisplay(frameRate, profile, properties); + m_ketsjiengine->SetRestrictAnimationFPS(restrictAnimFPS); m_engineInitialized = true; } |