20,741
edits
m (→Background) |
|||
| Line 196: | Line 196: | ||
== Useful C++ changes == | == Useful C++ changes == | ||
{{Note|The following patches are intended to help better understand what's going on behind the scenes. They are intended to be regularly rebased onto SG/FG 'next'. In the mid-term, our hope is to ensure that people working on Nasal/Canvas related features get a better understanding about when, where and why performance is affected.}} | {{Note|The following patches are intended to help better understand what's going on behind the scenes. They are intended to be regularly rebased onto SG/FG 'next'. In the mid-term, our hope is to ensure that people working on Nasal/Canvas related features get a better understanding about when, where and why performance is affected.}} | ||
== Dumping Canvas scene graphs to disk == | |||
<syntaxhighlight lang="diff"> | |||
</syntaxhighlight> | |||
=== Tracking update frequency per Canvas/Element === | === Tracking update frequency per Canvas/Element === | ||
This is intended to help people better understand how frequently a Canvas is being updated, which happens automatically once a property in the sub-tree is modified (usually involving timers and listeners): | This is intended to help people better understand how frequently a Canvas is being updated, which happens automatically once a property in the sub-tree is modified (usually involving timers and listeners): | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="diff"> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 206: | Line 210: | ||
The following patch is intended to help determine the rendering overhead of Canvas by adding optional draw-masks for disabling rendering of Canvas textures via their corresponding placements (aircraft, scenery and GUI): | The following patch is intended to help determine the rendering overhead of Canvas by adding optional draw-masks for disabling rendering of Canvas textures via their corresponding placements (aircraft, scenery and GUI): | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="diff"> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Under the hood, the corresponding Nasal/C++ code updating Canvas textures would obviously still be running - it would just be rendering that is explicitly disabled here. | Under the hood, the corresponding Nasal/C++ code updating Canvas textures would obviously still be running - it would just be rendering that is explicitly disabled here. | ||
=== Hooking up Canvas to the Osg Stats === | === Hooking up Canvas to the Osg Stats === | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="diff"> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 217: | Line 221: | ||
Once a complex Canvas texture (MFD) has been set up, the following patch can be used for invoking osgUtil::Optimizer() to finalize and optimize the scene graph: | Once a complex Canvas texture (MFD) has been set up, the following patch can be used for invoking osgUtil::Optimizer() to finalize and optimize the scene graph: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="diff"> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Tracking RAM utilization per Canvas === | === Tracking RAM utilization per Canvas === | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="diff"> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Tracking update/cull and draw per Canvas or Element === | === Tracking update/cull and draw per Canvas or Element === | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="diff"> | ||
</syntaxhighlight> | </syntaxhighlight> | ||
| Line 232: | Line 236: | ||
With Canvas textures typically not rendering any scene/scenery data (terrain), we don't necessarily need those Cameras to render within the main viewer. This is intended to help better leverage OSG-level concurrency support by using a separate CompositeViewer instance to render Canvas textures, without having to change the main OSGViewer and its threading mode: | With Canvas textures typically not rendering any scene/scenery data (terrain), we don't necessarily need those Cameras to render within the main viewer. This is intended to help better leverage OSG-level concurrency support by using a separate CompositeViewer instance to render Canvas textures, without having to change the main OSGViewer and its threading mode: | ||
<syntaxhighlight lang=" | <syntaxhighlight lang="diff"> | ||
</syntaxhighlight> | </syntaxhighlight> | ||