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:
@@ -38,7 +38,9 @@ EditorIntegrationTest::~EditorIntegrationTest() {
|
||||
}
|
||||
|
||||
absl::Status EditorIntegrationTest::Initialize() {
|
||||
RETURN_IF_ERROR(core::CreateWindow(window_, SDL_WINDOW_RESIZABLE));
|
||||
// Create renderer for test
|
||||
test_renderer_ = std::make_unique<gfx::SDL2Renderer>();
|
||||
RETURN_IF_ERROR(core::CreateWindow(window_, test_renderer_.get(), SDL_WINDOW_RESIZABLE));
|
||||
|
||||
IMGUI_CHECKVERSION();
|
||||
ImGui::CreateContext();
|
||||
@@ -55,9 +57,9 @@ absl::Status EditorIntegrationTest::Initialize() {
|
||||
io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard;
|
||||
|
||||
// Initialize ImGui for SDL
|
||||
ImGui_ImplSDL2_InitForSDLRenderer(
|
||||
controller_.window(), yaze::core::Renderer::Get().renderer());
|
||||
ImGui_ImplSDLRenderer2_Init(yaze::core::Renderer::Get().renderer());
|
||||
SDL_Renderer* sdl_renderer = static_cast<SDL_Renderer*>(test_renderer_->GetBackendRenderer());
|
||||
ImGui_ImplSDL2_InitForSDLRenderer(controller_.window(), sdl_renderer);
|
||||
ImGui_ImplSDLRenderer2_Init(sdl_renderer);
|
||||
|
||||
#ifdef YAZE_ENABLE_IMGUI_TEST_ENGINE
|
||||
// Register tests
|
||||
|
||||
Reference in New Issue
Block a user