Enabled v-sync in OpenGL and Pong examples (to make them smoother)

This commit is contained in:
Laurent Gomila 2011-12-25 23:13:13 +01:00
parent f55da8d8bc
commit c817f882e6
2 changed files with 2 additions and 0 deletions

View File

@ -15,6 +15,7 @@ int main()
{
// Create the main window
sf::RenderWindow window(sf::VideoMode(800, 600), "SFML OpenGL", sf::Style::Default, sf::ContextSettings(32));
window.EnableVerticalSync(true);
// Create a sprite for the background
sf::Texture backgroundTexture;

View File

@ -28,6 +28,7 @@ int main()
// Create the window of the application
sf::RenderWindow window(sf::VideoMode(gameWidth, gameHeight, 32), "SFML Pong");
window.EnableVerticalSync(true);
// Load the sounds used in the game
sf::SoundBuffer ballSoundBuffer;