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

Author Topic: Question about sprite/rectangle shape performance  (Read 1300 times)

0 Members and 1 Guest are viewing this topic.

EvOlLuTiOn

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Question about sprite/rectangle shape performance
« on: April 05, 2014, 10:05:26 pm »
Hi,

while working on my game i noticed this. It looks like sprite gives better performance than rectangle shape.

Here is link to my example app https://dl.dropboxusercontent.com/u/21883169/Release.rar

When using sprites i'm getting stable 80 FPS, but with rectangle shapes it's only 20 FPS. I mean shouldn't be performance with shapes better? Four times slower is a lot actually. Code for booth ways is almost identical.

I know that you can use vertex array, but i'm just curious about sprites/shapes overall performance (attached application is just demonstrational).

My second question is: Is it known fact that ATI GPU + AMD/INTEL CPU gives better performance in SFML than NVIDIA GPU + AMD/INTEL CPU?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: Question about sprite/rectangle shape performance
« Reply #1 on: April 05, 2014, 10:32:01 pm »
Sprites are optimized, otherwise this class would not exist and everybody would happily use rectangle shapes everywhere. So don't be surprised.

Quote
My second question is: Is it known fact that ATI GPU + AMD/INTEL CPU gives better performance in SFML than NVIDIA GPU + AMD/INTEL CPU?
No. But unless you tested many different configurations that use this pairs, I don't know how you could say that. It's just one (or a few) machines compared to one (or a few) other. And of course performances are different because every machine is different.
Laurent Gomila - SFML developer

 

anything