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

Author Topic: Sprite sheet performance  (Read 2451 times)

0 Members and 1 Guest are viewing this topic.

mbro2k

  • Newbie
  • *
  • Posts: 7
    • View Profile
Sprite sheet performance
« on: September 08, 2011, 06:50:44 am »
I have always read that sprite sheets increase performance
by having all of the image cached in graphics memory.

However, I have found that using very large sprite sheets
up to 2048x2048 (I need to handle high-res drawn animations),
seem to make things worse for older graphics cards.  
Specifically more stuttering and lower framerates when testing
a few older machines.

I compared some results when
just using separate textures(sf::Texture, formerly sf::Image)
for each frame, and it turned out much smoother(less stuttering
and framerate drops).

My guess is that these graphics cards have a problem caching textures
above 1024x1024 even though they can technically support them.
Is that possible?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Sprite sheet performance
« Reply #1 on: September 08, 2011, 07:48:51 am »
I don't think so. As long as there's enough video memory available, the texture should be created and stored on the graphics card. I have no idea why bigger textures cause these problems.
Laurent Gomila - SFML developer

slotdev

  • Sr. Member
  • ****
  • Posts: 385
    • View Profile
Sprite sheet performance
« Reply #2 on: September 08, 2011, 02:19:50 pm »
Can you give some examples of the hardware you are running on?

We use SFML 2.0 with 9x 2048x2048 textures on a system with 2x 1280x1024 monitors and find no problems on most hardware. What framerate are you trying to hit?
SFML 2.1

mbro2k

  • Newbie
  • *
  • Posts: 7
    • View Profile
Sprite sheet performance
« Reply #3 on: September 08, 2011, 10:45:34 pm »
Here are some of the older machine cards
Radeon 9200
Radeon 9800
Intel GMA X3100

I think the overall framerate is ok, aiming for 60.
It seems the main problem I am getting now is a hiccup/stutter/short-delay
while displaying an animation from a 2048 sheet for the first time.

But somehow when using smaller textures it handles things
better without pausing.

mbro2k

  • Newbie
  • *
  • Posts: 7
    • View Profile
Sprite sheet performance
« Reply #4 on: September 25, 2011, 08:58:17 pm »
I think I was actually using too much graphics memory for the cards,
and it was just different caching results depending on the sizes
swapping in and out.