Apparently vsync no longer works on Windows.
But I'm not sure as it could be a problem with my dinosaur PC ::)
Might be a graphics driver setting that forces vsync to be off by default? I'm not messing with that setting in OpenGL.
In fact I have to force the vsync to be activated but it's not a GLBasic problem because I tested with wglSwapIntervalEXT(1) and it's the same :(
It's an Intel integrated graphics card maybe with a normal graphics card there is not this problem, I don't know...
Generally VSync in full screen should work, one thing that's some kind awkward is that GLB starts glBegin right after flipping buffers.. Problem may be dependent from GPU/OS/drivers combination, as mentioned try forcing VSync in gpu drivers control panel. On older Vega iGPU I don't see issues (full screen, 60Hz display, fps set to 60-120 always limited by vsync to 60 without screen tearing).
You can also check stability of rendering frames with some software like MSI Afterburner or new Intel PresentMon.
Yes I have to force VSync from the control panel, if I leave it on the application settings it doesn't work :(
Fortunately, I use a deltatime for everything because otherwise I would have had a big speed problem in my programs.
The strange thing is that I had no problems with VSync until a Windows update.
Thanks dreamerman for confirming that the problem is with my computer.