Cubase 10 HiDPI, Windows and OpenGL



We’re seeing issues with OpenGL plug-ins built from the latest develop tip of JUCE running in Cubase 10.0.10 with HiDPI switched on, Windows 10.

Drawing is not correct: the GUI is incorrectly sized and/or it appears as if two of the GUI have been drawn in the window at different positions.

System has multiple screens, with the primary display at 3840 x 2160 scaled to 150% and all other screens at 100% scale. The drawing looks different on displays with different scale settings, but is always incorrect.

Below is a PIP that demonstrates the issue.
OpenGLPlugIn.h (5.8 KB)


Did you already have a look at these two threads?


I have @McMartin, and without an OpenGLContext attached the GUI content appears as expected. The window size is initially incorrect - as if Cubase is setting the dimensions using the primary monitor’s scale settings - but I don’t believe that is JUCE’s problem. Dragging between monitors fixes the window size and the content is always drawn correctly without OpenGL.

With an OpenGLContext attached, however, the GUI content is as described in my previous post. The window size behaviour remains the same (again, this is probably not JUCE’s fault) but the content is drawn incorrectly.

I built my example before and after the commit below, but unfortunately didn’t see any change to how the content was being drawn.


Has anyone managed to reproduce this yet?


I’ve just pushed a few commits to develop (notably ada0a05, 87cf4d2 and 7134bd0) which should address these issues. Let me know if it fixes things for you.


Thanks @ed95, that has helped, however there are still some problems.

On the 150% scaled screen, the content is now correctly positioned, but still too big (looks like 200% content in a 150% window).

When opening the GUI from a closed state on the 150% screen the window dimensions are correct. But, when opening it from closed on the 100% screen the window dimensions are still 150% (same as the primary monitor), although the content is the correct size, so there is a white gap to the right and bottom.

I’ll do some debugging to see if I can provide any further information.


IIUC, Cubase got only whole scales (also looking at develop vst3_wrapper code).

if this is declared by the plug-in so maybe using floor instead of round would be better?


I’ve debugged and played around with different parts of the code for many hours now and I still can’t figure out what’s going on here.

Add some text to the GUI and it’s clear that the OpenGL frame buffer image is being stretched at anything other than 100% scale. I checked that the frame buffer itself is drawing correctly by drawing everything into an image file. That comes out perfect at the correct, scaled dimensions.

Dividing the viewport by the scale before drawing it makes the content fit correctly in the window but then it’s obvious that it is being scaled down.

@ttg I tried swapping the calls to round() with calls to floor() but that didn’t seem to help. I’ve tried setting the monitor to 200% scale and that is just as bad.

This is driving me nuts.