epic: refactor SDL2_Renderer usage to IRenderer and queued texture rendering

- Updated the testing guide to clarify the testing framework's organization and execution methods, improving user understanding.
- Refactored CMakeLists to include new platform-specific files, ensuring proper integration of the rendering backend.
- Modified main application files to utilize the new IRenderer interface, enhancing flexibility in rendering operations.
- Implemented deferred texture management in various components, allowing for more efficient graphics handling and improved performance.
- Introduced new methods for texture creation and updates, streamlining the rendering process across the application.
- Enhanced logging and error handling in the rendering pipeline to facilitate better debugging and diagnostics.
This commit is contained in:
scawful
2025-10-07 17:15:11 -04:00
parent 9e6f538520
commit 6c331f1fd0
101 changed files with 1401 additions and 2677 deletions

View File

@@ -230,7 +230,9 @@ constexpr const char* kAssemblyEditorName = ICON_MD_CODE " Assembly Editor";
constexpr const char* kDungeonEditorName = ICON_MD_CASTLE " Dungeon Editor";
constexpr const char* kMusicEditorName = ICON_MD_MUSIC_NOTE " Music Editor";
void EditorManager::Initialize(const std::string& filename) {
void EditorManager::Initialize(gfx::IRenderer* renderer, const std::string& filename) {
renderer_ = renderer;
// Point to a blank editor set when no ROM is loaded
current_editor_set_ = &blank_editor_set_;
@@ -2097,6 +2099,8 @@ absl::Status EditorManager::LoadAssets() {
current_editor_set_->overworld_editor_.Initialize();
current_editor_set_->message_editor_.Initialize();
// Initialize the dungeon editor with the renderer
current_editor_set_->dungeon_editor_.Initialize(renderer_, current_rom_);
ASSIGN_OR_RETURN(*gfx::Arena::Get().mutable_gfx_sheets(),
LoadAllGraphicsData(*current_rom_));
RETURN_IF_ERROR(current_editor_set_->overworld_editor_.Load());