VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions
makVrv::DtOsgIncrementalCompileOperation Class Reference

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.

Inheritance diagram for makVrv::DtOsgIncrementalCompileOperation:
Inheritance graph
[legend]

Public Member Functions

virtual void purgeStaleContexts (const osgViewer::ViewerBase::Contexts &survivingContexts)
 

Private Member Functions

virtual void removeDeadContextEntries (CompileSet *cs, const osgViewer::ViewerBase::Contexts &survivingContexts)
 

Member Function Documentation

virtual void makVrv::DtOsgIncrementalCompileOperation::purgeStaleContexts ( 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.

Parameters
survivingContextsThe graphics contexts that remain valid.
virtual void makVrv::DtOsgIncrementalCompileOperation::removeDeadContextEntries ( CompileSet *  cs,
const osgViewer::ViewerBase::Contexts &  survivingContexts 
)
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.

Parameters
csThe CompileSet to scrub.
survivingContextsThe graphics contexts that remain valid.

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)