SFML community forums

Help => Graphics => Topic started by: blueeyedlion on July 14, 2012, 11:45:39 pm

Title: TextureRect changes without function call?
Post by: blueeyedlion on July 14, 2012, 11:45:39 pm
When I move my sprite to the right or left, there are random flashes of the line of pixels to the right of it on the sprite map.  Just as if the width of the texture rect were increased by one for one frame.  During this movement, the setTextureRect function is not called.  Would this have anything to do with giving the sprite float co-ordinates?
Title: Re: TextureRect changes without function call?
Post by: eXpl0it3r on July 14, 2012, 11:50:29 pm
I've experienced those flashes too back on my old notebook with integrated Intel graphics chip, but I've never figured out what the source was.
A similar problem appears when using sf::Texture::setSmooth(true) but I guess you didn't use that function.

Since now on my new ATI graphics card I don't experience anything like this, I'd say it's more a hardware problem. May I ask what your PC specs are?

Or did I get your problem all wrong? Maybe a picture of the right and wrong displaying could be helpfull to understand it better. :)
Title: Re: TextureRect changes without function call?
Post by: Laurent on July 15, 2012, 09:19:03 am
It happens because of float coordinates, yes. Don't expect pixel perfect rendering when using them.