Replying here even though the issue I’m observing is not opengl related.
Specs: Win10 1903, Cubase 10.0.30 and 10.0.40, JUCE 5.4.3 and 5.4.4.
This affects VST3 plugins.
I’m observing broken scaling in a very particular case:
- Configure a windows 10 system with two displays, with the primary display having a scale factor of 100%, the secondary display a scale factor of 200%
- Use Cubase 10.0.30 or 10.0.40 with high dpi enabled, maximize it on the primary screen.
- Create an empty project with a plugin instance
- Move the plugin window to the secondary screen (the one with 200% scale)
- Close the plugin ui (cubase will remember the window position)
- Open the plugin ui
- Observe that the window is too small and the Plugin UI is getting truncated. Plugin-internal scaling is correct, the window bounds are not.
This is observable with an empty projucer template plugin project.
Some additional observations:
The bug works the other way round too: When opening the plugin on the secondary screen, the window bounds are too big, following a scale factor of 200%, while the contents are being scaled correctly (100%). In this case, moving the plugin back and forth between two screens temporarily fixes it.
Code/Debugging: On plugin UI open, setContentScaleFactor is called 3 times:
- with factor 1
- with factor 2
- with factor 1 again
It is worth noting that plugins by other vendors are being affected too.
Now, to me this looks like Cubase is reporting wrong factors to the Plugin, but I’m not 100% certain. It took me some time to find a particular setup for which this becomes reproducable (see steps above). Some (few) clients reported the issue and I have no idea how to easily fix this.
Any insight or confirmation would be helpful, thanks!