Zini wrote:
With lag you mean a longer cell load? That is possible. We skipped some possible optimisations during the refactoring. I haven't noticed any difference though. There was always a small delay on cell load. Would be interesting to have someone with a slower box to compare the performance pre- and post-refactoring.
My old laptop probably is the slowest box here. I'll do the comparison this weekend.
Did you ever do a comparison?
Committed more stuff.
Yes and it's quite interesting.
I couldn't really notice any difference in cell loading, but I've got more fps with the new renderer in small interior cells while only half the fps in exterior cells compared to the master branch.
We don't need this output for anything, once the development of the animation system is finished, right? So you could just keep it for now and remove it, when you are done. As I wrote before I am reluctant to introduce new script instructions prior to 1.0, because that might cause incompatibilities with the script system (albeit the chance for complications is pretty low).
The other option would be to add a new command line switch (--anim-verbose, set to false by default).
Okay then. The procedure for adding new command line switches is easy:
1. Add a new switch in main.cpp (there are plenty of examples for boolean switches)
2. Read out the state of the switch (also in main.cpp) and pass the result to the Engine (engine.hpp/engine.cpp).
3. In Engine do whatever you need to do with the flag so it reaches its destination.
Note that you should not have any low level system query Engine for the flag. Ideally only main.cpp should include engine.hpp (which is currently not enforced unfortunately).
Filled out NpcAnimation and CreatureAnimation with my latest commit, moved rendering code to their constructors.
Also still no physics for npcs and creatures because of the bug previously mentioned when changing cells (not sure how to fix this yet).
EDIT: Should I make a map of <MWWorld::Ptr, Animation>, that way when you do deleteObject you could delete the associated MWRender::Animation?
When we do removeCell() should it clear the data structure containing all the MWRender::Animation objects?
Also still no physics for npcs and creatures because of the bug previously mentioned when changing cells (not sure how to fix this yet).
Me neither. And I don't have the time to look into it right now. Maybe next year
Should I make a map of <MWWorld::Ptr, Animation>, that way when you do deleteObject you could delete the associated MWRender::Animation?
Well you need some kind of container in Actors. A map is fine. I would consider using std::map<MWWorld::Ptr, Animation *> instead though. The above wouldn't have worked anyway because of slicing and using a pointer also allows you to move an Animation to a different Ptr without copying it.
When we do removeCell() should it clear the data structure containing all the MWRender::Animation objects?
All the animation objects in that cell, obviously.