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

Author Topic: Is there a function that clears a specific sprite  (Read 1484 times)

0 Members and 1 Guest are viewing this topic.

Chocolatesheep

  • Newbie
  • *
  • Posts: 17
    • View Profile
Is there a function that clears a specific sprite
« on: December 17, 2011, 08:20:51 pm »
Instead of using window.Clear(); (window being the name of my window) is there any way I can clear a specific sprite from the window instead of clearing the whole window then drawing all the sprites on it again?


-Edit
Ok, if I must clear all and rendraw everything then how do I prevent flickering?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Is there a function that clears a specific sprite
« Reply #1 on: December 17, 2011, 08:45:57 pm »
No, you must clear the whole window and redraw everything.
Laurent Gomila - SFML developer

Tex Killer

  • Full Member
  • ***
  • Posts: 242
    • View Profile
Is there a function that clears a specific sprite
« Reply #2 on: December 18, 2011, 01:16:51 am »
Chocolatesheep, enable vertical sync:

Code: [Select]
window.UseVerticalSync(true);