SFML community forums

Help => Graphics => Topic started by: Pliskeviski on September 02, 2017, 08:47:27 pm

Title: Loading from file problem.
Post by: Pliskeviski on September 02, 2017, 08:47:27 pm
Hello! I have a problem here, I have .png that contains a circle, but when a "shoot", shows a square.
Thanks!
Title: Re: Loading from file problem.
Post by: eXpl0it3r on September 02, 2017, 09:01:09 pm
See The White Square Problem as described in the tutorial: https://www.sfml-dev.org/tutorials/2.4/graphics-sprite.php#the-white-square-problem

tl;dr don't copy the texture and make sure it doesn't run out of scope as long it's used
Title: Re: Loading from file problem.
Post by: Pliskeviski on September 02, 2017, 09:33:56 pm
Thanks! It's working.