SFML community forums

Help => Graphics => Topic started by: trilavia on January 09, 2013, 02:13:51 pm

Title: Rendering on minus coordinates in linux
Post by: trilavia on January 09, 2013, 02:13:51 pm
I have a strange problem. After porting my game to linux and to newest SFML 2 snapshot, the strange bug appeard. When I draw textured sprite at for example (0, -5), it doesn't get drawn at all. On windows and sfml 2.0 rc, the sprite was drawn cutted at the top (which is what I need for smooth scrolling). Is there something different on linux/was something changed in sfml recently? Or it is a bug in my code and for you drawing on linux on minus coordinates works?

Nvm... It was caused because C++ is weird....

int a = 5
unsigned int b = 30;

a - b = 423121312313213213
 
So stupid, I need to cast unsigned to int every time I store something in unsigned (ie widget position).