mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-02 15:53:51 +00:00
Optimize logging overhead and character animation threading
This commit is contained in:
parent
9d647e5622
commit
85c8b5d5f4
5 changed files with 73 additions and 14 deletions
|
|
@ -5,6 +5,7 @@
|
|||
#include <sstream>
|
||||
#include <mutex>
|
||||
#include <fstream>
|
||||
#include <chrono>
|
||||
|
||||
namespace wowee {
|
||||
namespace core {
|
||||
|
|
@ -73,6 +74,8 @@ private:
|
|||
std::mutex mutex;
|
||||
std::ofstream fileStream;
|
||||
bool fileReady = false;
|
||||
std::chrono::steady_clock::time_point lastFlushTime_{};
|
||||
uint32_t flushIntervalMs_ = 250;
|
||||
void ensureFile();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include <unordered_set>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <future>
|
||||
|
||||
namespace wowee {
|
||||
namespace pipeline { class AssetManager; }
|
||||
|
|
@ -269,6 +270,8 @@ private:
|
|||
|
||||
// Maximum bones supported
|
||||
static constexpr int MAX_BONES = 240;
|
||||
uint32_t numAnimThreads_ = 1;
|
||||
std::vector<std::future<void>> animFutures_;
|
||||
|
||||
// Shadow pipeline resources
|
||||
VkPipeline shadowPipeline_ = VK_NULL_HANDLE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue