Hello
I have this png file:
(http://4.bp.blogspot.com/-wUsk-3wsQbQ/Ug4-VcmBhCI/AAAAAAAAALc/c_QZ-9X_1Dw/s1600/play.png)
Firstly i load it as a texture(using loadfromFile function) and then create a sprite and decide the part of the texture I want to display(using sf::IntRect).
.
.
.
sf::Texture PlayTexture;
if(!PlayTexture.loadfromFile("Play.png"))
return EXIT_FAILURE;
sf::Sprite PlayNotSelected;
PlayNotSelected.setTexture(PlayTexture);
PlayNotSelected.setTextureRect(sf::IntRect(1, 1, 80, 30));
.
.
.
Now when I draw it in my SFML window, which was previously loaded with another sprite having a magenta background, something like this occurs:
(http://1.bp.blogspot.com/-1Vac0cXm_3Q/Ug4_UWMm3LI/AAAAAAAAALs/P5AqRaTUe3E/s1600/Screenshot_1.png)
My question is how do I remove the white from the png file display it as if it has no background color? And the way I displayed my window background and play.png, is ther any better way to do so?
Like here:
(http://2.bp.blogspot.com/-xvCxrYA2uQI/Ug5BPLh-QwI/AAAAAAAAAL8/VD2JGoSzsQk/s1600/delete.png)
Details:
I browsed the internet to clarify this and came accross terms like color masking or so but didn't understand them quite well. If this preocess has a particular name, please tell me that also :)
Thanks