OK, I will try to make a long story short. The whole application is based on broadcast video output (I support various cards). To output to these cards, I have to use a separate thread (let’s call it video thread), and all other stuff is synced to this thread (even the one with the opengl render), ie. it signals to the others to do their jobs.
I have a preview window on the VGA monitor that is refreshed with Swapbuffer, but since PAL video is 50Hz and VGA is anything but, playback on this preview output is understandably not smooth.
If there is not broadcast video card in the system, the VGA preview is the only output, but unless I rewrite all of my threads just for the VGA-only setup, there is still a video thread calling all others. But this video thread has no idea about Vsync, it can signal the opengl thread to render the next frame, but playback will not be smooth.
At least it wasn’t until I tried to put the Swapbuffers call to the video thread. Now I get smooth playback on the preview window, but only in XP. The newer OSs do not tolerate this at all. If you think that it is not even expected to work in any other thread but the opengl rendering one, and I am only lucky with XP, then I will drop the idea altogether.