SFML community forums
Help => Graphics => Topic started by: section_two on August 20, 2011, 11:32:35 pm
-
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.
-
It was already fixed before you posted ;)