1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-12 16:58:39 +00:00

Reduce the use of porting::getTimeMs() when rendering frames (#12679)

* Avoid calling TimeTaker too frequently in renderMapXXX
* Calculate animation timer once per frame
* Remove code that breaks rendering frame at 2000ms

Co-authored-by: sfan5 <sfan5@live.de>

Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
x2048 2022-08-13 22:33:26 +02:00 committed by GitHub
parent 0e439b2fa3
commit d1cbb4bd8a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 16 deletions

View file

@ -34,6 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include "settings.h"
#include "shader.h"
#include "content_cao.h"
#include "porting.h"
#include <algorithm>
#include "client/renderingengine.h"
@ -513,3 +514,8 @@ void ClientEnvironment::getSelectedActiveObjects(
}
}
}
void ClientEnvironment::updateFrameTime()
{
m_frame_time = porting::getTimeMs();
}