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

Author Topic: Change the blend mode used by Texture::update  (Read 1708 times)

0 Members and 1 Guest are viewing this topic.

vynokris

  • Newbie
  • *
  • Posts: 1
    • View Profile
Change the blend mode used by Texture::update
« on: February 19, 2021, 12:25:04 pm »
Hello,
I am trying to use the function Texture::update to paste a texture onto another. However, right now, all the pixels get pasted even though some are transparent. How do I change this so that transparent pixels do not get pasted ?
Thanks in advance.

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Change the blend mode used by Texture::update
« Reply #1 on: February 19, 2021, 02:00:43 pm »
You don't. Update replaces pixels by other pixels.

If you want to draw a texture onto another texture, use an sf::RenderTexture.