16
Graphics / [SOLVED] Failed to create texture, internal size too big
« on: February 19, 2015, 06:11:13 pm »
Greetings.
Started learning to use SFML, took a while to set up libraries and whatnot but it works. Now, the first image I want to display gives me this error, and it can't be the size because it's 32x32 px. It's a jpg.
This is the bit of code that handles the texture:
What am I doing wrong?
Started learning to use SFML, took a while to set up libraries and whatnot but it works. Now, the first image I want to display gives me this error, and it can't be the size because it's 32x32 px. It's a jpg.
This is the bit of code that handles the texture:
Code: [Select]
sf::Texture texture;
if (!texture.loadFromFile("texture.jpg", sf::IntRect(100, 100, 32, 32)))
{
// error...
}
What am I doing wrong?