To reduce cache size and make it more flexible.
Adding off mesh connections to the navmesh is the last step of navmesh
generation and it's very fast comparing to other steps (microseconds vs
milliseconds). Having less cache size makes get and set operations almost 2x
times faster that also have an order of microseconds. So in total there is
no performance impact.
This is less error prone approach than use of MovedCellRef fields.
Also make separate functions for skipping and reading moved cell refs to avoid
passing special flags logic and null pointers for unused arguments.
Instead of explicit work queue stop before any possibly used engine manager
is destructed. Based on an assumption that any engine manager can be destructed
independently from the work queue destruction. This model is already used in
CellPreloader that conflicts with explicit work queue stop.
After the work queue is requested to be stopped, any client waiting for a not
started work item to be done will wait forever because the work item is dropped
from the queue. Therefore either clients should not wait for own work items to
be completed in destructor or the work queue should not drop items before
clients are destructed. Other approaches are possible but are not considered
due to increasing complexity.
CellPreloader already tries to wait for all created work items to be done so
keep it that way and extend the model to AsyncScreenCaptureOperation and Scene.
Additionally abort all scheduled work items when owner is destructed. This
prevents a long exit when multiple screenshots are scheduled right before
exiting the game.
Factoring common code parts outside of a template
is apparently a good practise to reduce code duplication
(and the size of openmw by around 0.5%),
and should improve a bit the performances,
since the whole `std::to_string` * 2 + string concatenation
dance results in quite a lot of code, preventing inlining on my machine.
- default to 1 thread
- default to always use defered aabb update, remove option
- always keep a cache of LOS request for at least the current frame.
This decreases number of raycast, especially when a lot of actors are
involved and "NPCs avoid collisions" is on
../../../apps/openmw/engine.cpp:706:23: error: no viable constructor or deduction guide for deduction of template arguments of 'function'
? std::function(ScheduleNonDialogMessageBox {})
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1430:48: note: candidate template ignored: could not match 'function<_Fp>' against '(anonymous namespace)::ScheduleNonDialogMessageBox'
template<class _Fp> class _LIBCPP_TEMPLATE_VIS function; // undefined
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1430:48: note: candidate function template not viable: requires 0 arguments, but 1 was provided
../../../apps/openmw/engine.cpp:707:23: error: no viable constructor or deduction guide for deduction of template arguments of 'function'
: std::function(IgnoreString {})
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/functional:1430:48: note: candidate template ignored: could not match 'function<_Fp>' against '(anonymous namespace)::IgnoreString'
template<class _Fp> class _LIBCPP_TEMPLATE_VIS function; // undefined
^