SFML community forums
Bindings - other languages => Java => Topic started by: skarwild on May 24, 2014, 02:03:34 pm
-
Hello,
I would like to draw a sprite from a thread but I get the following error:
Failed to create texture, size invalid (0x0)
while my code looks good.
My code:
Sprite s = this.listAnim.get(count).getImage(); // return a sprite
s.setPosition(x+5,y+10);
render.draw(s);
thank you
-
Well, the error message concerns the failure of creating a texture, which happens way before you create the sprite. You seem to create a texture of 0x0 size, and that won't work.
If you can't figure out what's wrong, please post the code that you use for loading your texture?