SFML community forums

Help => General => Topic started by: Siemekk on November 28, 2017, 06:40:22 pm

Title: Problem with change texture by function
Post by: Siemekk on November 28, 2017, 06:40:22 pm
Hello  ;D I have problem with change RectangleShape texture. When i add code to main function, rectangle have my texture. But when i try do it by other function, RectangleShape always no have texture?
My code:
https://pastebin.com/AZkXVb8z

Why i can't change texture in other function? I'm using Visual Studio and SFML 2.4.1. Thanks for Help  :)
Title: Re: Problem with change texture by function
Post by: eXpl0it3r on November 28, 2017, 08:25:58 pm
Read the texture and sprite tutorial again, especially the section about The White Square Problem (https://www.sfml-dev.org/tutorials/2.4/graphics-sprite.php#the-white-square-problem).