Hi, why this code throw
Failed to create texture, invalid size (0x0)
#include <SFML/Graphics.hpp>
#include <map>
int main()
{
std::map<int,sf::Texture> myTexture;
myTexture[0].LoadFromFile("image.jpg");
return 0;
}
If I make a sprite, set the texture to it, and draw the sprite, works, but why throw "failed to create texture"?
Thanks.