Уменьшение размер промежуточного буфера. Отчистка меша чанка, если тот пуст.

This commit is contained in:
2026-01-28 22:46:35 +03:00
parent da673b0965
commit 07ccd4dd68
6 changed files with 28 additions and 5 deletions

View File

@@ -29,6 +29,7 @@
#include <png++/png.hpp>
#include "VulkanRenderSession.hpp"
#include <Server/GameServer.hpp>
#include <malloc.h>
extern void LoadSymbolsVulkan(TOS::DynamicLibrary &library);
@@ -222,6 +223,8 @@ void Vulkan::run()
} catch(const std::exception &exc) {
LOG.error() << "Game.Session->shutdown: " << exc.what();
}
Game.Session = nullptr;
}
if(!NeedShutdown && glfwWindowShouldClose(Graphics.Window)) {
@@ -240,11 +243,12 @@ void Vulkan::run()
try {
if(Game.Session)
Game.Session->shutdown(EnumDisconnect::ByInterface);
Game.Session = nullptr;
} catch(const std::exception &exc) {
LOG.error() << "Game.Session->shutdown: " << exc.what();
}
Game.Session = nullptr;
try {
if(Game.Server)
Game.Server->GS.shutdown("Завершение работы из-за остановки клиента");
@@ -2254,6 +2258,10 @@ void Vulkan::gui_MainMenu() {
}
}
if(ImGui::Button("Memory trim")) {
malloc_trim(0);
}
if(ConnectionProgress.InProgress) {
if(ImGui::Button("Отмена"))
ConnectionProgress.Cancel = true;
@@ -2305,6 +2313,10 @@ void Vulkan::gui_ConnectedToServer() {
Game.ImGuiInterfaces.pop_back();
}
if(ImGui::Button("Memory trim")) {
malloc_trim(0);
}
ImGui::End();
if(Game.Выйти)