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

Author Topic: Sprite becomes distorted  (Read 1675 times)

0 Members and 1 Guest are viewing this topic.

fallahn

  • Hero Member
  • *****
  • Posts: 507
  • Buns.
    • View Profile
    • Trederia
Sprite becomes distorted
« on: November 02, 2013, 12:19:03 pm »
This only happens maybe once in every 200 times, but when drawing this image with an sf::Sprite (nothing fancy, just a normal sprite) instead of getting this I get this.

It seems like the vertex array in the sprite is somehow getting messed up - but as it happens so rarely I have no idea how to reproduce it. I'm not really expecting anyone to come up with a fix for this - I just wondered if it was something known about or if someone has come across something similar in the past

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Sprite becomes distorted
« Reply #1 on: November 02, 2013, 01:08:45 pm »
Could be some memory corruption, but not really easy to tell and can have multiple origins.

You could first try to figure out what exactly gets corrupted by checking with the debugger if the sprite's internals are all intact, but given that it only happens randomly this will be rather hard.

Also make sure your graphics driver is uptodate, one never knows what strange things they can do... ;D
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/