Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: TextureRect changes without function call?  (Read 1304 times)

0 Members and 1 Guest are viewing this topic.

blueeyedlion

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
TextureRect changes without function call?
« 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?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: TextureRect changes without function call?
« Reply #1 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. :)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: TextureRect changes without function call?
« Reply #2 on: July 15, 2012, 09:19:03 am »
It happens because of float coordinates, yes. Don't expect pixel perfect rendering when using them.
Laurent Gomila - SFML developer