Page 1 of 1

HiDPI issues with Cubase 10.0.40 / Windows 10

Posted: Thu Sep 26, 2019 4:50 pm
by lorcan

I've implemented the VST3 IPlugViewContentScaleSupport interface to support automatic HiDPI scaling in Windows compatible hosts.
It works fine in all hosts we found had support for this interface:
  • Presonus Studio One
  • Bitwig Studio
  • FL Studio
  • Tracktion Waveform
  • Steinberg Wavelab
  • editorhost from the VST3 sdk sources
However in Cubase 10 with HiDPI mode activated, the UI pixels look like they're bieng upscaled by the OS / UI code used in Cubase.
Cubase 10 HiDPI.png
The plug-in is built using our internal framework, which uses OpenGL to draw the UI.
I've dumped the contents of the GL framebuffer to try and understand what's going on:
Cubase 10 HiDPI Framebuffer.png
As you can see internally the pixels are drawn correctly (the black part corresponds to the part of the window that isn't displayed / invalidated / redrawn).

What's extremly strange if that if I run the debug version of the plug-in, clicking on the plug-in window bar to move it after a few seconds
triggers some change in Cubase and the UI is redrawn correctly :?

The VST2 versions gets garbled, although there is no internal DPI scaling involved:
Cubase 10 HiDPI VST2.png
This is what it's supposed to look like: Image

Any help with this would be greatly appreciated !


NB: For reference here is the log of the UI creation:

Code: Select all

EditorVST3::ctor() name: Superchord
IEditorVST3::get_size() null component, using default: 890x406
IEditorVST3::on_size(890x406 @ (0, 0)) null component
EditorVST3::attached() parent: 00000000000a0e80 - HWND, creating editor
IComponent::init(Superchord) size: 890.0x406.0
Window::create() registering class 'lmdsp.superchord.64.class'
Window::create() class: 'lmdsp.superchord.64.class' (sub) start
Window::create() creating sub window class: 'lmdsp.superchord.64.class', size: 890x406 -> client size: 890x406, parent: 'Plugin View'
IComponent::on_window_maximize(Superchord: no)
IComponent::on_window_resized() name: Superchord[1], root: 0x0 -> 890x406, backing: 1.00, os: 890x406
Window::create() dpi mode: monitor, ratio: 1.50, parent: 1.50, size: 890x406 -> client: 890x406
Window::create() class: 'lmdsp.superchord.64.class', HNWD: 0x0000000000020ff6, parent: 0x00000000000a0e80 ('Plugin View') complete
EditorVST3::attached() scale not dirty
IEditorVST3::on_size(890x406 @ (0, 0))
EditorVST3::attached() host resize to -> 890x406
IComponent::on_backing_scale() 1.00 -> 2.00
IComponent::on_window_maximize(Superchord: no)
IComponent::on_window_resized() name: Superchord[1], root: 890x406 -> 890x406, backing: 2.00, os: 1780x812
IEditorVST3::on_size(1780x812 @ (0, 0))
IEditorVST3::setContentScaleFactor() 1.00x -> 2.00x, target size: 1780x812 -> ok
IEditorVST3::on_size(1780x812 @ (0, 0))
IEditorVST3::on_size(1780x812 @ (0, 0))
EngineGL::initialize_gl() dsa: arb, ext, program uniform
IEngine::set_scale() 1.00x -> 2.00x
Canvas[1]::set_size() 0x0 -> 890x406, scale: 2.00x
EngineGL::start_draw() size: 0x0 -> 1780x812, scaling: 2.00x
FrameBuffer::set_size() 0x0 -> 1780x812
Bitmap::write() '' written to 'C:\Users\lorca\Desktop\screenshots\superchord\'
EditorVST3::removed() about to close and delete editor
EditorVST3::~dtor() name: Superchord