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

@@ -1,14 +1,9 @@
#include "canvas_context_menu.h"
#include <algorithm>
#include <sstream>
#include <iomanip>
#include "app/core/window.h"
#include "app/gfx/arena.h"
#include "app/gfx/performance_profiler.h"
#include "app/gfx/performance_dashboard.h"
#include "app/gui/widgets/palette_widget.h"
#include "app/gui/bpp_format_ui.h"
#include "app/gui/icons.h"
#include "app/gui/color.h"
#include "app/gui/canvas/canvas_modals.h"
@@ -303,15 +298,21 @@ void CanvasContextMenu::RenderBitmapOperationsMenu(gfx::Bitmap* bitmap) {
if (ImGui::BeginMenu("Format")) {
if (ImGui::MenuItem("Indexed")) {
bitmap->Reformat(gfx::BitmapFormat::kIndexed);
core::Renderer::Get().UpdateBitmap(bitmap);
// Queue texture update via Arena's deferred system
gfx::Arena::Get().QueueTextureCommand(
gfx::Arena::TextureCommandType::UPDATE, bitmap);
}
if (ImGui::MenuItem("4BPP")) {
bitmap->Reformat(gfx::BitmapFormat::k4bpp);
core::Renderer::Get().UpdateBitmap(bitmap);
// Queue texture update via Arena's deferred system
gfx::Arena::Get().QueueTextureCommand(
gfx::Arena::TextureCommandType::UPDATE, bitmap);
}
if (ImGui::MenuItem("8BPP")) {
bitmap->Reformat(gfx::BitmapFormat::k8bpp);
core::Renderer::Get().UpdateBitmap(bitmap);
// Queue texture update via Arena's deferred system
gfx::Arena::Get().QueueTextureCommand(
gfx::Arena::TextureCommandType::UPDATE, bitmap);
}
ImGui::EndMenu();
}