SFML community forums

Help => Graphics => Topic started by: EvOlLuTiOn on April 05, 2014, 10:05:26 pm

Title: Question about sprite/rectangle shape performance
Post by: EvOlLuTiOn 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 (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?
Title: Re: Question about sprite/rectangle shape performance
Post by: Laurent 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.