added vsync, fixed clipping