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

Author Topic: How many is "a lot" of sf::Sprites?  (Read 1805 times)

0 Members and 1 Guest are viewing this topic.

gws923

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
How many is "a lot" of sf::Sprites?
« on: December 09, 2016, 05:14:06 am »
From the FAQ:

"My FPS count drops when drawing a lot of sprites."

How many is "a lot?"  I feel like I might be reaching that point, but I've probably got about... 100-200 sprites in my level?

Related question: does SFML ignore my draw() calls if whatever I'm drawing isn't on screen?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: How many is "a lot" of sf::Sprites?
« Reply #1 on: December 09, 2016, 07:30:15 am »
200 sprites is not a lot, unless you have a really old machine with crappy graphics drivers.

Quote
does SFML ignore my draw() calls if whatever I'm drawing isn't on screen?
Nop, SFML does nothing. A common optimization is to avoid drawing what's not visible, to save bandwidth and GPU processing.
Laurent Gomila - SFML developer

gws923

  • Jr. Member
  • **
  • Posts: 60
    • View Profile
Re: How many is "a lot" of sf::Sprites?
« Reply #2 on: December 09, 2016, 08:03:17 am »
Awesome.  Both answers are just what I wanted to hear.  Thank you, Laurent!

 

anything