Hi, I'm experiencing severe screen tearing in my application.
I've enabled the vertical synchronization with
setVerticalSyncEnabled(true) but to no good effect (both on Windows 7 and Ubuntu 12.04).
However, after manually forcing v-sync in nVidia control panel the tearing miraculously disappeared.
Now here's the thing: I have GeForce GT 620M & Intel HD 3000 working in Optimus setup. On Linux I've disabled the nVidia card altogether to save power and on Windows as far I know Intel is still the default one if there's no existing profile for the application.
Forced v-sync works on both GPUs,
setVerticalSyncEnabled(true) works on none.
Is there a stronger way to set v-sync programatically?
EDIT3: browsing around, looking for solution, I've established that we're using
wglSwapIntervalEXT(1) to enable v-sync in SFML. Why this wouldn't work remains a puzzle to me
And while I'm on it - does anyone know if the solution from http://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf to select stronger GPU in Optimus setups works OK with SFML (I'm going to try it out eventually, but perhaps someone has a quick answer)?EDIT2: Answering myself and anyone interested: yes, it works
I ended up with this code:
#ifdef __MINGW32__
#include <windows.h>
extern "C" {
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
}
#endif // __MINGW32__
Thanks
EDIT: I think this should actually go to the Window section (
http://en.sfml-dev.org/forums/index.php?board=6.0), sorry.