Interestingly, a month ago you have expressed the exact opposite of your current statement
I'm not saying binding is light, I'm saying switching sprite's texture to another one and proceeding with drawing everything as before is.
The point is that they
probably already draw something in between their huge animations so it doesn't matter if animation's texture id is 20, 30 or 666, because the last catched texture is 1000 from something entirely different so they have to rebind anyway.
Like this:
#include <iostream>
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow app(sf::VideoMode(768,768),"app");
sf::Texture background,things[2];
int index=0,framecount=0;
sf::Uint64 timecount=0;
{
sf::Image image;
image.create(1024,1024,sf::Color::White);
background.loadFromImage(image);
image.create(1024,1024,sf::Color::Red);
things[0].loadFromImage(image);
image.create(1024,1024,sf::Color::Blue);
things[1].loadFromImage(image);
}
sf::Sprite back(background);
sf::Sprite thing(things[0]);
sf::Clock clock;
sf::Event eve;
while(app.isOpen())
{
while(app.pollEvent(eve))
{
//switch texture, single ptr swap
if(eve.type==sf::Event::KeyPressed) thing.setTexture(things[index=!index]);
else if(eve.type==sf::Event::Closed) app.close();
}
app.clear();
app.draw(back);//1!=2, 1!=3, bind id 1
app.draw(thing);//2!=1, 3!=1 , bind id 2 or id 3
app.display();
std::cout<<"Avg:"<<(timecount+=clock.getElapsedTime().asMicroseconds())/(++framecount)<<std::endl;
std::cout<<"This frame:"<<clock.restart().asMicroseconds()<<std::endl;
}
}