Skip to content

Commit

Permalink
gh-14: remove layer stack and debug layer (legacy thing)
Browse files Browse the repository at this point in the history
  • Loading branch information
EgorOrachyov committed Aug 6, 2024
1 parent d0cf94d commit b7bcdb6
Show file tree
Hide file tree
Showing 14 changed files with 7 additions and 329 deletions.
2 changes: 1 addition & 1 deletion engine/runtime/asset/asset_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace wmoge {
std::lock_guard guard(m_mutex);

auto& id = asset->get_id();
auto& rtti = asset->get_class_name();
auto rtti = asset->get_class_name();

auto unloader = find_unloader(rtti);
if (unloader) {
Expand Down
4 changes: 2 additions & 2 deletions engine/runtime/core/log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@

#include "log.hpp"

#include "debug/console.hpp"
#include "platform/file_system.hpp"
#include "platform/time.hpp"
#include "system/console.hpp"
#include "system/ioc_container.hpp"

#include <magic_enum.hpp>
Expand Down Expand Up @@ -115,7 +115,7 @@ namespace wmoge {
<< entry.message << "\n";
}

LogListenerConsole::LogListenerConsole(class Console* console, LogLevel level)
LogListenerConsole::LogListenerConsole(Console* console, LogLevel level)
: m_console(console), m_level(level) {
}
void LogListenerConsole::on_message(const LogEntry& entry) {
Expand Down
88 changes: 0 additions & 88 deletions engine/runtime/debug/debug_layer.cpp

This file was deleted.

45 changes: 0 additions & 45 deletions engine/runtime/debug/debug_layer.hpp

This file was deleted.

4 changes: 1 addition & 3 deletions engine/runtime/engine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,9 @@
#include "scripting/script_system.hpp"

#include "system/config.hpp"
#include "system/console.hpp"
#include "system/engine.hpp"
#include "system/hook.hpp"
#include "system/ioc_container.hpp"
#include "system/layer.hpp"
#include "system/plugin.hpp"
#include "system/plugin_manager.hpp"

#include "debug/console.hpp"
2 changes: 1 addition & 1 deletion engine/runtime/grc/shader_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

#include "core/log.hpp"
#include "core/string_utils.hpp"
#include "debug/console.hpp"
#include "grc/shader_builder.hpp"
#include "grc/shader_library.hpp"
#include "io/enum.hpp"
Expand All @@ -38,6 +37,7 @@
#include "profiler/profiler.hpp"
#include "rtti/type_storage.hpp"
#include "system/config.hpp"
#include "system/console.hpp"
#include "system/ioc_container.hpp"

#include <cassert>
Expand Down
5 changes: 1 addition & 4 deletions engine/runtime/platform/application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
#include "core/cmd_line.hpp"
#include "core/log.hpp"
#include "core/task_manager.hpp"
#include "debug/console.hpp"
#include "debug/debug_layer.hpp"
#include "ecs/ecs_registry.hpp"
#include "gfx/vulkan/vk_driver.hpp"
#include "glsl/glsl_shader_compiler.hpp"
Expand Down Expand Up @@ -68,10 +66,10 @@
#include "scripting/lua/lua_script_system.hpp"
#include "scripting/script_system.hpp"
#include "system/config.hpp"
#include "system/console.hpp"
#include "system/engine.hpp"
#include "system/hook.hpp"
#include "system/ioc_container.hpp"
#include "system/layer.hpp"
#include "system/plugin_manager.hpp"

#include "asset/_rtti.hpp"
Expand All @@ -95,7 +93,6 @@ namespace wmoge {
ioc->bind<DllManager>();
ioc->bind<PluginManager>();
ioc->bind<Time>();
ioc->bind<LayerStack>();
ioc->bind<Config>();
ioc->bind<FileSystem>();
ioc->bind<Console>();
Expand Down
File renamed without changes.
File renamed without changes.
24 changes: 1 addition & 23 deletions engine/runtime/system/engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@
#include "core/cmd_line.hpp"
#include "core/log.hpp"
#include "core/task_manager.hpp"
#include "debug/console.hpp"
#include "debug/debug_layer.hpp"
#include "ecs/ecs_registry.hpp"
#include "gfx/vulkan/vk_driver.hpp"
#include "grc/pso_cache.hpp"
Expand Down Expand Up @@ -65,10 +63,10 @@
#include "scripting/lua/lua_script_system.hpp"
#include "scripting/script_system.hpp"
#include "system/config.hpp"
#include "system/console.hpp"
#include "system/engine.hpp"
#include "system/hook.hpp"
#include "system/ioc_container.hpp"
#include "system/layer.hpp"
#include "system/plugin_manager.hpp"

#include <cassert>
Expand All @@ -85,7 +83,6 @@ namespace wmoge {
m_class_db = ClassDB::instance();
m_type_storage = ioc->resolve_v<RttiTypeStorage>();
m_time = ioc->resolve_v<Time>();
m_layer_stack = ioc->resolve_v<LayerStack>();
m_cmd_line = ioc->resolve_v<CmdLine>();
m_hook_list = ioc->resolve_v<HookList>();
m_file_system = ioc->resolve_v<FileSystem>();
Expand Down Expand Up @@ -142,7 +139,6 @@ namespace wmoge {

m_aux_draw_manager->init();
m_console->init();
m_layer_stack->attach(std::make_shared<DebugLayer>());

if (m_config->get_bool_or_default(SID("window.exit"), true)) {
WG_LOG_INFO("configure exit on primary window close");
Expand All @@ -161,10 +157,6 @@ namespace wmoge {

auto windows = m_window_manager->get_windows();

m_layer_stack->each_up([](LayerStack::LayerPtr& layer) {
layer->on_start_frame();
});

m_gfx_driver->begin_frame(m_frame_id, windows);

if (m_scene_manager) {
Expand All @@ -175,18 +167,6 @@ namespace wmoge {
m_texture_manager->update();
}

m_layer_stack->each_up([](LayerStack::LayerPtr& layer) {
layer->on_iter();
});

m_layer_stack->each_up([](LayerStack::LayerPtr& layer) {
layer->on_debug_draw();
});

m_layer_stack->each_down([](LayerStack::LayerPtr& layer) {
layer->on_end_frame();
});

m_window_manager->poll_events();

m_gfx_driver->end_frame(true);
Expand All @@ -198,7 +178,6 @@ namespace wmoge {
WG_AUTO_PROFILE_SYSTEM("Engine::shutdown");

m_plugin_manager->shutdown();
m_layer_stack->clear();
m_task_manager->shutdown();
m_console->shutdown();
m_scene_manager->clear();
Expand All @@ -217,7 +196,6 @@ namespace wmoge {
RttiTypeStorage* Engine::type_storage() { return m_type_storage; }
ClassDB* Engine::class_db() { return m_class_db; }
Time* Engine::time() { return m_time; }
LayerStack* Engine::layer_stack() { return m_layer_stack; }
HookList* Engine::hook_list() { return m_hook_list; }
CmdLine* Engine::cmd_line() { return m_cmd_line; }
DllManager* Engine::dll_manager() { return m_dll_manager; }
Expand Down
2 changes: 0 additions & 2 deletions engine/runtime/system/engine.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ namespace wmoge {
class RttiTypeStorage* type_storage();
class ClassDB* class_db();
class Time* time();
class LayerStack* layer_stack();
class HookList* hook_list();
class CmdLine* cmd_line();
class DllManager* dll_manager();
Expand Down Expand Up @@ -100,7 +99,6 @@ namespace wmoge {
class RttiTypeStorage* m_type_storage = nullptr;
class ClassDB* m_class_db = nullptr;
class Time* m_time = nullptr;
class LayerStack* m_layer_stack = nullptr;
class HookList* m_hook_list = nullptr;
class CmdLine* m_cmd_line = nullptr;
class DllManager* m_dll_manager = nullptr;
Expand Down
50 changes: 0 additions & 50 deletions engine/runtime/system/layer.cpp

This file was deleted.

Loading

0 comments on commit b7bcdb6

Please sign in to comment.