SFML community forums

Help => Graphics => Topic started by: bumblecorn on February 06, 2013, 07:08:11 pm

Title: Background image problems
Post by: bumblecorn on February 06, 2013, 07:08:11 pm
I have an asteroids type game with a massive image for a background (6000x4000).  I have increased the area of the level by using two sf::Views, so you can move "outside" the screen area and it will track you until you reach the edge of the second View, hence the massive image.

Anyway, the problem is that there is some tear in the image when it's being updated, like a "ripple" going up the screen whenever the image is moving. This problem is only present when using the frame limiter function:

window.setFramerateLimit(60);

Without limiting the frame-rate there is no image tearing. Is this something I have to deal with, or is it an easy fix?
Title: Re: Background image problems
Post by: Nexus on February 06, 2013, 07:18:00 pm
This effect is called screen tearing. Try to enable VSync.
Title: Re: Background image problems
Post by: bumblecorn on February 06, 2013, 07:32:39 pm
That did the trick, thank you! I had no idea there was a V sync function.