You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, if the renderer uses logcal coordinates, imgui behavior is broken:
UI is rendered to logical resolution and then scaled to window coordinates. I believe it should use window coordinates regardless of logical resolution.
Mouse coordinates are off
As a workaround, I reset logical resolution before calling imgui frame and set it back after. Also I use SDL_RenderLogicalToWindow to convert mouse coordinates before sending them to imgui backend.
Maybe it's worth adding as a part of the library? Current behavior doesn't look good...
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
The text was updated successfully, but these errors were encountered:
ocornut
changed the title
[SDL] Supporting logical size in renderer
SDL Backend: Supporting logical size in renderer
Jan 22, 2025
Version/Branch of Dear ImGui:
Version 1.91.6, Branch: XXX master
Back-ends:
imgui_impl_sdl2.cpp + imgui_impl_sdlrenderer2.cpp + imgui_impl_sdl3.cpp + imgui_impl_sdlrenderer3.cpp
Compiler, OS:
Windows 11 + MSVC2022
Full config/build information:
Details:
Both SDL2 and SDL3 allow a fixed logical resolution for rendering, regardless of the actual output resolution. For more information, please see https://wiki.libsdl.org/SDL3/SDL_SetRenderLogicalPresentation.
Currently, if the renderer uses logcal coordinates, imgui behavior is broken:
As a workaround, I reset logical resolution before calling imgui frame and set it back after. Also I use SDL_RenderLogicalToWindow to convert mouse coordinates before sending them to imgui backend.
Maybe it's worth adding as a part of the library? Current behavior doesn't look good...
Screenshots/Video:
No response
Minimal, Complete and Verifiable Example code:
The text was updated successfully, but these errors were encountered: