![]() |
VR-Forces Developer's Guide
|
Subclass of osgUtil::IncrementalCompileOperation that works around an OSG bug where removing a graphics context leaves orphaned CompileSets permanently stuck in the _toCompile queue. When a graphics context is destroyed, pending CompileSets that reference the dead context can never complete because their _numberCompileListsToCompile counter is never decremented to zero.
Call purgeStaleContexts() after removing the view and re-assigning the surviving graphics contexts.

Public Member Functions | |
| virtual void | purgeStaleContexts (const osgViewer::ViewerBase::Contexts &survivingContexts) |
Private Member Functions | |
| virtual void | removeDeadContextEntries (CompileSet *cs, const osgViewer::ViewerBase::Contexts &survivingContexts) |
|
virtual |
Removes compile map entries for any graphics context not in the surviving set, and removes CompileSets that can no longer complete. Fires the compile-completed callback on removed CompileSets so that external job counters (e.g. GLObjectsCompiler::_jobsActive) are properly decremented.
Must be called after removeView() so that no new CompileSets can target the dead context.
| survivingContexts | The graphics contexts that remain valid. |
|
privatevirtual |
Removes entries from a single CompileSet's compile map whose graphics context is no longer in the surviving set, or whose compile list has already been drained. Decrements _numberCompileListsToCompile for each removed entry.
| cs | The CompileSet to scrub. |
| survivingContexts | The graphics contexts that remain valid. |