# SetVSync

## Description

Sets whether vertical sync should be turned on or off. This is the preferred method of limiting the frame rate as it will link the frame rate to the monitor refresh rate and avoid tearing or stuttering. Using this command with mode 1 will override any currently set refresh rate from SetSyncRate, otherwise these two commands would fight each other for control of the frame rate, instead AGK will use the VSync refresh rate which is typically 60 frames per second, but depends on the monitor.

## Definition

SetVSync( mode )

void agk::SetVSync( int mode )

## Parameters

- mode - 1 to turn vsync on, 0 to turn it off.