I’m trying to incorporate OpenGL to draw stuff faster. Following this Tutorial, I made it to the point where my component is showing a black screen, as nothing is rendered into the OpenGL context yet.
However, this is where everything comes to a grinding halt: The GUI now runs at 0.1 FPS, even dragging the window is impossible. This is directly tied to the OpenGLComponent being shown, when hiding it, everything seems to work as usual.
When using the JUCE Demorunner App I can sometimes click the various OpenGL demos, but around half the time clicking any will freeze the Demorunner.
Can’t speak from any direct experience with JUCE, but historically the reason for syncing to vertical blank in computer graphics is to avoid “tearing”, since the update should happen during the vertical blanking period whilst the beam isn’t visible (this is a term from CRT displays though, I’m not exactly sure how it applies with flat panels).
Good I was right, but this is not a solution.
Now if you run top you may see that your example takes whole core of CPU. And enabling Graphics API Visual Indicator (in nvidia-settings) shows tens thousands of FPS.
I found that in Vital synth and in recent Waveform (11.5.18 12.0.xx) with GTX 970 and GTX 660.
Now i’m on old Radeon and that issue is partially here, Vital seems fine, but Waveform has always stalled GUI with OpenGL render.