Windows 11 Issue with openGL

I’ve got some issues with JUCE plugin on reaper windows 11, on a mixed openGL/software rendering plugin.

Windows 11 Pro 21h2
Intel i7-12700k
Nvidia 1060GTX
Reaper v6.67

Note that it was reproduced with integrated GPU and dedicated GPU. Not reproductible on Windows 10.

When there is a mix between openGL and CPU rendering in a window, the drawing become very laggy in certain situation.
The basic scenario is just load the plugin, drag a simple knob, and it may lag dragging knobs.
Another scenario is to run an automation on a parameter bound to a knob, making the knob repaint, then resize the REAPER window (not the plugin one, the window with tracks) to a small size, the knob redraw will start to lag. You can also reproduce by dragging the REAPER window to be partly (at least half of it) out of screen.
I think it’s more on the OS side but I wanted to report it here too.
Some other considerations:

  • If you launch certain other application (for example vsthost) while the knob is lagging, the other application will lag too.
  • If you use spy++ (the msvc windowing tool located in “Common7\Tools” folder of VS installation) and you inspect messages of the PLUGIN window, you won’t have lag anymore (I suppose this is due to something like missing refresh on the plugin window, which spy++ may force)
  • While you resize the REAPER window, you won’t have lags, only when the resize is finished.
  • the OpenGL drawing area is always fluid, only the software rendering part lags

If you want to reproduce, I’ve modified the GainPlugin example from JUCE repository, just clone the repo and launch the build commands:

cmake --build cmake-build --target GainPlugin_All

The repo to reproduce:

May be Windows 11 update was not the best thing to do :smiley: