State machines will now throw exceptions if errors are encountered
when loading the XML file.
This includes:
- Unknown <source> or <target> states referenced by transitions
- States and transitions without <name> elements
- Transitions without <target> or <condition> elements
- State machines with fewer than two states
Previously the state machine would load and then crash when hitting
such malformed states or transitions. Now it will refuse to load,
while providing useful error messages as to the problem.
This is to help diagnose where performance is being used and augments the current performance monitor.
The easiest way to active this is to open the performance monitor; however setting the enable property will enable less intrusive logging and overrun detection.
Using the GUI performance monitor itself affects the performance when it updates.
Properties
/sim/performance-monitor/enabled - need to be true to be active (unchanged)
/sim/performance-monitor/dump-stats - hierarchical dump to console of all current timing stats for all subsysems
/sim/performance-monitor/interval-s - reporting interval (unchanged)
/sim/performance-monitor/max-time-per-frame-ms - any subsystem that takes more than this amount of will be logged to the console
This will use the inherently unsafe versions of the load methods which can result in deleting an object (from the cache) that has just been loaded in the database thread.
Symptom OSG WARN deleting still referenced object.
- use a file contents hash instead of filepath.
- add a local lru cache for filepath->hash (for performance improvements)
- calculate and resize to nearest power of two
- handle normal maps and images from effects differently.
- when cache is active any image that can't be converted to a dds will have a mipmap generated (which still helps the loading process); although this may be responsible for introducing purple into transparent images..
This should have been in the previous commit - However I managed to mess up the merging of this module due to other changes related to the DDS texture cache.
Possibly this could be fixed better by using the plugin string data - but there is nothing that currently set this; and it seems easier to use the particle callback enabled flag.
Remove would_log() : callbacks receive all log messages so they can
do custom filtering individually.
Also move popup message handling into the private (d-ptr) of sglog(),
to keep the header as minimal impossible (no include of <vector>)
1. Anything that comes in from OSG will always be logged; it seems
somewhat redundant to have to set the FG log level to be identical to
the OSG log level to see these messages.
2. Console output will now have delta time (since start), priority and class.
3. Log file output wil also have delta time (since start), priority and class.
Times are displayed as delta decimal seconds since the logger was created
e.g.
1294.06 [INFO]:terrain Some log message