From 8784cbfebcb8a0220fb947a6070032e20b80fc2f Mon Sep 17 00:00:00 2001 From: untodesu Date: Thu, 11 Sep 2025 14:13:39 +0500 Subject: Another qfengine graft: resource management DECOPYPASTA DECOPYPASTA DECOPYPASTA DECOPYPASTA --- game/client/main.cc | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'game/client/main.cc') diff --git a/game/client/main.cc b/game/client/main.cc index 51d4670..72c116e 100644 --- a/game/client/main.cc +++ b/game/client/main.cc @@ -221,6 +221,11 @@ int main(int argc, char** argv) spdlog::info("opengl: version: {}", reinterpret_cast(glGetString(GL_VERSION))); spdlog::info("opengl: renderer: {}", reinterpret_cast(glGetString(GL_RENDERER))); + BinFile::register_resource(); + Image::register_resource(); + TextureGUI::register_resource(); + SoundEffect::register_resource(); + glDisable(GL_MULTISAMPLE); IMGUI_CHECKVERSION(); @@ -406,22 +411,14 @@ int main(int argc, char** argv) globals::window_framecount += 1; - resource::soft_cleanup(); - resource::soft_cleanup(); - - resource::soft_cleanup(); - resource::soft_cleanup(); + resource::soft_cleanup(); threading::update(); } client_game::shutdown(); - resource::hard_cleanup(); - resource::hard_cleanup(); - - resource::hard_cleanup(); - resource::hard_cleanup(); + resource::hard_cleanup(); spdlog::info("client: shutdown after {} frames", globals::window_framecount); spdlog::info("client: average framerate: {:.03f} FPS", 1.0f / globals::window_frametime_avg); -- cgit