I'm programming a game with cocos2d-x for Windows, Linux and MacOS (for the moment I develop and test on Windows 10). I already have a system to change settings (either fullscreen or windowed with different resolutions but always a ratio of 16:9).
I've implemented a prototype of my levels system, with only a few sprites and the ability to move horizontally. In windowed mode everything is ok, but in fullscreen mode at native resolution I experience some tearing, though the resolution is set to 60 fps, on a 60 Hz screen (and the fps counter actually displays 60).
When investigating this issue, I've read on the thread OpenGL tearing with fullscreen native resolution that this may be due to bypassing the DWM compositor in fullscreen native resolution, which is otherwise doing some kind of vsync.
I would like to force vsync but I've not found any function neither in class cocos2d::Director
nor cocos2d::GLView
to do this, and with cocos2d-x I can't do this on a low-level (never using OpenGL directly).
Any idea of how to remove tearing / force vsync?