I ripped through a simple OpenGL runtime from the SFML example and got everything working except the animation, which is playing backwards.
Looking at the original source, I'm confused as to what the 2nd parameter to animation.apply() is supposed to be? It appears to just take a float representing seconds passed since animation start, but the way the code goes about doing that seems needlessly complex?
float delta = deltaClock.getElapsedTime().asSeconds();
deltaClock.restart();
animationTime += delta;
animation->apply(skeleton, animationTime, true);
If I understand this correctly, we get the elapsed time since the last frame, restart our timer, and then add that elapsed time to our animationTime variable. Then we send it to animate->apply().
Isn't that the same as sending getElapsedTime() in, without ever resetting the clock?
I know I'm missing something here, because when I try to do just that in my own code, poor SpineBoy only walks backwards...