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:
parent
0e439b2fa3
commit
d1cbb4bd8a
4 changed files with 19 additions and 16 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue