SFML community forums
Help => Graphics => Topic started by: Chiggy_Playz on April 18, 2019, 08:23:06 pm
-
I want to apply an if condition that if sprite does not have texture, then run.
-
Sprite has a get texture that returns a pointer which can be NULL if it was never set.
https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1Sprite.php#a1a76155146c8ff37c4eb5a306b4e9ebe
-
A sprite always has a texture. That the texture has been loaded should be guaranteed by your application flow and can be checked when loadFromFile is called. :)