1
Graphics / White sprite
« on: May 31, 2012, 09:43:00 pm »
Okay, im having this problem and don't quite know how to fix it.
I have a class that implements/extends the class Sprite.
And I'm using it like this:
But I'm always getting white box in the same size as the image without anything else.
Can someone please tell me how to fix it or give me an example usage.
Thanks!
I have a class that implements/extends the class Sprite.
class Background: public Sprite {
public:
Background();
virtual ~Background();
};
Then in the constructor I got it like this:public:
Background();
virtual ~Background();
};
Background::Background() {
Image image;
image.LoadFromFile("Sprites/BitRed.png");
SetImage(image);
}
Image image;
image.LoadFromFile("Sprites/BitRed.png");
SetImage(image);
}
And I'm using it like this:
Background sprite;
win.draw(sprite);
win.draw(sprite);
But I'm always getting white box in the same size as the image without anything else.
Can someone please tell me how to fix it or give me an example usage.
Thanks!