I’m playing with OpenGL for some time now, and I was wandering if there was any official way to make the back-buffer flipping stuff v-synchronized (while in fullscreen).
I mean not only happen every frame, but also happen at a moment (I think that is called vertical blank) when the flip does not cause that bad tearing at some scanline…
I played with the PixelFormat properties and with the ‘appropriate’ extension (wglSwapHint or something…) without any success on neither my previous ATI Rage Pro or my current GeForce.
Can anybody tell me if some solutions exist, and if these are hardware dependant ?!
I know for the NVIDIA drivers, the user is given full control over the state of vsyncing. They allow the user to set it to always off, on by default, or off by default. I would assume that the defaults will allow an app to change the state of vsyncing, whereas if set to always off, no app can change the state of vsyncing (at least without hacking the driver’s registry keys). So you might want to see if your driver was set to keep vsync always off.
Hmm, I knew my post wasn’t very clear My ‘problem’ does not come from driver settings (I always leave vsync on).
In fact, even when leaving vsync on, you can notice some tearing in the display (not bad flickering as when vsync is off). This problem is particularly visible when buffer swapping occurs every screen refresh.
This is due to the video buffers being swapped at a moment where the electron beam of the screen is sweeping the screen.
This kinda problem doesn’t occur with DirectX, and with good old DOS-ModeX screen, that could be avoided without any problem…
But it seems that OGL drivers don’t have this a control on hardware ! too bad…
I don’t know if it will help but don’t forget
that in windowed mode you’ll not be able to set the synchro for a smooth & nice vertical blanking!! Anyway, if it is ugly in fullscreen modes it only depends on vendor’s driver implementation!! Of course, the swap routine & waitVbl stuff are always in asynchronous state by default…
Good luck!
Note: New nvidia 6.18 drivers now support Vertical blank sync!
waitVbl func!!
Tell me if i’m wrong, but I tought rendering OpenGL in a surface created by DDraw was very erractic : it worked only on a few systems, depending on driver releases …
No ?!