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

Author Topic: Drawing without clearing the window problem  (Read 879 times)

0 Members and 1 Guest are viewing this topic.

adelinnn

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Drawing without clearing the window problem
« on: July 29, 2019, 08:35:34 pm »
Hello! In this program i want to draw every frame a circle(same circle) but with different colors.
My problem is that every circle that have been already drawn gets a new color every frame.
I hope you understand which is my problem.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10819
    • View Profile
    • development blog
    • Email
Re: Drawing without clearing the window problem
« Reply #1 on: July 31, 2019, 10:34:58 am »
You need to clear the window. If you want to preserve drawn things, you can use a render texture.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

 

anything