logging the available renderers

This commit is contained in:
2026-03-10 10:18:40 +01:00
parent 8b64e1e6fd
commit 7e0cc8da76

View File

@@ -1,6 +1,7 @@
#include "Application.h" #include "Application.h"
#include "Event.h" #include "Event.h"
#include "Log.h" #include "Log.h"
#include "SDL3/SDL_render.h"
#include "imgui.h" #include "imgui.h"
#include "imgui_impl_sdl3.h" #include "imgui_impl_sdl3.h"
#include "imgui_impl_sdlrenderer3.h" #include "imgui_impl_sdlrenderer3.h"
@@ -41,6 +42,9 @@ bool Application::Init() {
} else { } else {
LOG_INFO("SDL window position set to the initial value: x {0}, y {1}", GetWindowData().pos_x, GetWindowData().pos_y); LOG_INFO("SDL window position set to the initial value: x {0}, y {1}", GetWindowData().pos_x, GetWindowData().pos_y);
} }
LOG_INFO("Available renderer drivers:");
for (int i = 0; i < SDL_GetNumRenderDrivers(); i++) {
LOG_INFO("{0}. {1}", i + 1, SDL_GetRenderDriver(i));
} }
m_Renderer = SDL_CreateRenderer(m_Window, nullptr); m_Renderer = SDL_CreateRenderer(m_Window, nullptr);
@@ -48,6 +52,7 @@ bool Application::Init() {
LOG_ERROR("Renderer could not be created! {0}", SDL_GetError()); LOG_ERROR("Renderer could not be created! {0}", SDL_GetError());
} else { } else {
LOG_INFO("SDL renderer created"); LOG_INFO("SDL renderer created");
LOG_INFO("Renderer: {0}", SDL_GetRendererName(m_Renderer));
} }
SDL_SetRenderVSync(m_Renderer, 1); SDL_SetRenderVSync(m_Renderer, 1);