implement vsync and fullscreen