fix: backlight setting not applying on change

This commit is contained in:
MihailRis 2024-10-15 04:58:46 +03:00
parent 4dfa235f12
commit d59fac61bb
6 changed files with 20 additions and 0 deletions

View file

@ -79,6 +79,12 @@ void ChunksRenderer::unload(const Chunk* chunk) {
}
}
void ChunksRenderer::clear() {
meshes.clear();
inwork.clear();
threadPool.clearQueue();
}
std::shared_ptr<Mesh> ChunksRenderer::getOrRender(const std::shared_ptr<Chunk>& chunk, bool important) {
auto found = meshes.find(glm::ivec2(chunk->x, chunk->z));
if (found == meshes.end()) {

View file

@ -39,6 +39,7 @@ public:
std::shared_ptr<Mesh> render(const std::shared_ptr<Chunk>& chunk, bool important);
void unload(const Chunk* chunk);
void clear();
std::shared_ptr<Mesh> getOrRender(const std::shared_ptr<Chunk>& chunk, bool important);
std::shared_ptr<Mesh> get(Chunk* chunk);

View file

@ -410,3 +410,7 @@ void WorldRenderer::drawBorders(
}
lineBatch->flush();
}
void WorldRenderer::clear() {
renderer->clear();
}

View file

@ -96,4 +96,6 @@ public:
float delta,
bool pause
);
void clear();
};