I’m working on a multiscreen project which should be cross platform macOS/Windows.
For multiple windows management I followed the “oneAppMultiWindow” example, which in this specific case fits better than the two-apps / two-windows scheme I used other times.
Everything works nicely, except that frame rate with two windows open is sensibly lower than the frame rate with only one window open, even when I do not draw a single thing.
When I run the app commenting out all the drawing code I get around 130 fps but when I close the window in second screen the frame rate jumps up over 200 fps.
I keep vertical sync disabled because with vertical sync enabled I get always close to 60 fps but with a lot of jitter and the visual result is a 30 fps looking laggy animation.
It’s a consistent behaviour on Visual Studio/Windows 10 across a couple of quad core i7 HP and a six-core i7 MSI gaming machine. While on Xcode/MacOS both in an old macBookPro Retina i7 2013 and a “trashcan” MacPro it doesn’t matter whether the second window is open or not, I get always ridiculously high fps and fluid animation.
I tried switching to the two-windows / two-apps model but nothing changes.
It seems that on Windows some major overhead is generated somewhere when two ofAppBaseWindow are active, and it tends to get worse when windows are big, even with no drawing code. Sharing gl context between windows or not does not make a difference at all.
I also had a little deeper look in GLFW and OpenGL, but I’m not able to find a meaningful explanation. Do anyone have any idea?.. Thank you in advance.