Refactor window management and renderer integration for improved structure

- Replaced platform backend references with a dedicated Window class for better encapsulation of window and audio device management.
- Updated various files to include the new window header, enhancing clarity and reducing dependencies on the platform backend.
- Removed obsolete platform backend code to streamline the codebase and improve maintainability.
- Refactored controller and editor classes to utilize the new window management system, ensuring consistent handling of window creation and rendering.
This commit is contained in:
scawful
2025-08-03 16:09:51 -04:00
parent e05e59fb14
commit b5f6930d38
18 changed files with 120 additions and 356 deletions

View File

@@ -6,7 +6,7 @@
#include <memory>
#include "absl/status/status.h"
#include "app/core/platform/backend.h"
#include "app/core/window.h"
#include "app/editor/editor_manager.h"
int main(int argc, char **argv);
@@ -30,12 +30,7 @@ class Controller {
void DoRender() const;
void OnExit();
absl::Status CreateWindow();
absl::Status CreateRenderer();
absl::Status CreateGuiContext();
absl::Status LoadConfigFiles();
auto window() -> SDL_Window * { return window_.get(); }
auto window() -> SDL_Window * { return window_.window_.get(); }
void set_active(bool active) { active_ = active; }
auto active() const { return active_; }
@@ -43,9 +38,8 @@ class Controller {
friend int ::main(int argc, char **argv);
bool active_ = false;
core::Window window_;
editor::EditorManager editor_manager_;
std::shared_ptr<SDL_Window> window_;
core::PlatformBackend<Sdl2Backend> backend_;
};
} // namespace core