mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 03:51:50 +00:00
debug::Logger
This commit is contained in:
parent
f298d6ef1d
commit
0c411cf227
16 changed files with 233 additions and 51 deletions
|
|
@ -22,10 +22,14 @@ class ContentGfxCache;
|
|||
|
||||
struct mesh_entry {
|
||||
BlocksRenderer& renderer;
|
||||
glm::ivec2 key;
|
||||
};
|
||||
|
||||
struct Result {
|
||||
std::condition_variable& variable;
|
||||
int workerIndex;
|
||||
bool& locked;
|
||||
glm::ivec2 key;
|
||||
mesh_entry entry;
|
||||
};
|
||||
|
||||
class ChunksRenderer {
|
||||
|
|
@ -35,7 +39,7 @@ class ChunksRenderer {
|
|||
std::unordered_map<glm::ivec2, bool> inwork;
|
||||
std::vector<std::thread> threads;
|
||||
|
||||
std::queue<mesh_entry> results;
|
||||
std::queue<Result> results;
|
||||
std::mutex resultsMutex;
|
||||
|
||||
std::queue<std::shared_ptr<Chunk>> jobs;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue