-
-
Notifications
You must be signed in to change notification settings - Fork 8
Description
On Windows, the initial size and scale factor of the ImGui plugins aren't consistent. I'm using REAPER 7.35 as the host.
I've been trying to figure out the problem but it seems to be very complex underneath.
Taking the ImGuiDemo plugin as an example, with an added widget
ImGui::Begin("debug");
ImGui::Text("scale: %f", getScaleFactor());
ImGui::Text("width: %d", getWidth());
ImGui::Text("height: %d", getHeight());
ImGui::End();
Standalone app
The standalone app is working fine. The default size is 600x400, so x2.5 is 1500x1000.
VST3
For VST3, the initial window size is 600x400, but the ImGui is rendered on a 1080x720 framebuffer. You have to manually resize the window to display the gui completely. The initial scale factor is somehow 1.8 instead of the correct 2.5. uiScaleFactorChanged
is triggered with the correct value 2.5, but the value from getScaleFactor
is not updated.
LV2
For LV2, the initial window size is also 600x400, but this time the ImGui is rendered on the correct framebuffer size 600x400 (still not the scaled 1500x1000). The initial scale factor is the correct 2.5.
Others
The GUI is blank for CLAP and is broken for VST2.
The getScaleFactor()
is also not updated when the plugin window is moved to another monitor with a different display scale, but uiScaleFactorChanged
is triggered, so getScaleFactor
doesn't seem to account for the fact that the scale factor can change.