mirror of
https://github.com/SFML/SFML.git
synced 2024-11-28 22:31:09 +08:00
Enabled v-sync in OpenGL and Pong examples (to make them smoother)
This commit is contained in:
parent
f55da8d8bc
commit
c817f882e6
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user