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

Author Topic: Does it make sense to use texture atlases with sfml?  (Read 1753 times)

0 Members and 1 Guest are viewing this topic.

dydya-stepa

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Does it make sense to use texture atlases with sfml?
« on: December 05, 2011, 03:11:12 pm »
Just saw some notes about texture atlases in another thread.

Does it make sense to use them with sfml? Upcoming graphics API for sfml ?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Does it make sense to use texture atlases with sfml?
« Reply #1 on: December 05, 2011, 03:19:03 pm »
Yes, it always makes sense because changing the current texture is a costly operation for the graphics driver.
Laurent Gomila - SFML developer

dydya-stepa

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Does it make sense to use texture atlases with sfml?
« Reply #2 on: December 05, 2011, 06:23:49 pm »
how costly is it?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Does it make sense to use texture atlases with sfml?
« Reply #3 on: December 05, 2011, 07:32:34 pm »
I really don't know what kind of answer you expect, with such a question.

50 dollars? :lol:
Laurent Gomila - SFML developer

dydya-stepa

  • Jr. Member
  • **
  • Posts: 82
    • View Profile
Does it make sense to use texture atlases with sfml?
« Reply #4 on: December 05, 2011, 08:45:30 pm »
maybe you have some estimates like let's say we draw 1000 sprites and get 100 fps without optimization, with atlases we get 200. Then it make sense. If we get 102 fps with optimization then it's useless.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Does it make sense to use texture atlases with sfml?
« Reply #5 on: December 05, 2011, 09:23:50 pm »
There are so many things that can impact the result, it's really impossible to say. Some may see a huge improvement, some others may not see any difference.

That's why you should test and profile your own application before applying this kind of optimization. Only real numbers are meaningful.
Laurent Gomila - SFML developer