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

Author Topic: Sprite gets mirrored?  (Read 1823 times)

0 Members and 1 Guest are viewing this topic.

bostonbrooks

  • Newbie
  • *
  • Posts: 6
    • View Profile
Sprite gets mirrored?
« on: July 08, 2018, 08:25:12 am »
How come when I use sfTexture_copy everything goes as expected,
But if I create a Sprite based on the source texture and draw it to a RenderTexture that contains the destination texture, the result is a mirror image of what I was hoping for.
I can work around this by setting the y-scale of the sprite to -1 but I'd like to know why this behavior occurs in the first place.

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Sprite gets mirrored?
« Reply #1 on: July 08, 2018, 09:58:43 am »
You have to call display for RenderTexture like you would for a RenderWindow.

bostonbrooks

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Sprite gets mirrored?
« Reply #2 on: July 08, 2018, 11:17:01 am »
I have.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: Sprite gets mirrored?
« Reply #3 on: July 08, 2018, 02:54:02 pm »
IIRC it was a bug that already got fixed on the master branch.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/