Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scaling issues on MacOS Retina #105

Closed
sagacity opened this issue Nov 9, 2021 · 5 comments
Closed

Scaling issues on MacOS Retina #105

sagacity opened this issue Nov 9, 2021 · 5 comments

Comments

@sagacity
Copy link

sagacity commented Nov 9, 2021

I'm seeing issues with the rendering of a VST UI in Reaper on a Macbook with a Retina display.

This happens both with imgui-baseview and with egui-baseview.

Here's what happens with the Gain example from https://github.com/DGriffin91/imgui_baseview_test_vst2, for instance (this is Reaper's "FX Chain" UI btw):

Scaling issue

The same thing happens with any other imgui or egui example. There is some rendering going on though: changing the clear_color of the window has effect, for instance. The only way I can fix this is by hard-coding the scale_factor of the window to 1.0 here. Supplying a WindowScalePolicy::ScaleFactor(1.0) in the WindowOpenOptions should do the same thing, but does not seem to have any effect.

If I manually double the window size in the example code here, then I do see the outlines of some UI being rendered, completely off-center and clipped:

Scaling issue 2

Stepping through the baseview code, I do see that the logical size is the size that is being configured by me and the physical size is double that (since scale_factor is calculated to be 2.0). I am assuming the issue is not related specifically to either the imgui or egui renderers since they both exhibit the same behaviour. Additionally, running the imgui-baseview examples by themselves (i.e. outside of the VST host) works fine as well. So I'm a bit stumped on what the root cause could be.

@greatest-ape
Copy link
Contributor

It might be related to the issue this PR solves: glowcoil/raw-gl-context#13

@sagacity
Copy link
Author

sagacity commented Jan 6, 2022

If I have some time soon, I'll try to give it a quick test!

@sagacity
Copy link
Author

@greatest-ape I can confirm this solves the issue, when using the latest baseview and imgui-baseview revisions together with your raw-gl-context patch. Great :)

@greatest-ape
Copy link
Contributor

@sagacity my PR has been merged now!

@sagacity
Copy link
Author

Awesome 😍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants