--- OpenSceneGraph-3.0.1-orig/include/osgViewer/ViewerBase	2011-04-19 15:01:38.000000000 +0200
+++ OpenSceneGraph-3.0.1/include/osgViewer/ViewerBase	2012-04-02 01:38:12.347478200 +0200
@@ -15,6 +15,7 @@
 #define OSGVIEWER_VIEWERBASE 1
 
 #include <osg/Stats>
+#include <osg/OperationThread>
 
 #include <osgUtil/UpdateVisitor>
 #include <osgUtil/IncrementalCompileOperation>
@@ -179,6 +180,21 @@
         void removeUpdateOperation(osg::Operation* operation);
 
 
+        /** Set the CullBackground OperationQueue. */
+        void setCullBackgroundOperations(osg::OperationQueue* operations) { _updateOperations = operations; }
+
+        /** Get the CullBackground OperationQueue. */
+        osg::OperationQueue* getCullBackgroundOperations() { return _cullBackgroundOperations.get(); }
+        
+        /** Get the const CullBackground OperationQueue. */
+        const osg::OperationQueue* getCullBackgroundOperations() const { return _cullBackgroundOperations.get(); }
+        
+        /** Add an CullBackground operation.*/
+        void addCullBackgroundOperation(osg::Operation* operation);
+
+        /** Remove an CullBackground operation.*/
+        void removeCullBackgroundOperation(osg::Operation* operation);
+
         /** Set the graphics operation to call on realization of the viewers graphics windows.*/
         void setRealizeOperation(osg::Operation* op) { _realizeOperation = op; }
 
@@ -323,6 +339,8 @@
         osg::ref_ptr<osgUtil::IncrementalCompileOperation>  _incrementalCompileOperation;
 
         osg::observer_ptr<osg::GraphicsContext>             _currentContext;
+
+        osg::ref_ptr<osg::OperationQueue>                   _cullBackgroundOperations;
 };
 
 }
--- OpenSceneGraph-3.0.1-orig/src/osgViewer/ViewerBase.cpp	2011-06-23 14:10:54.000000000 +0200
+++ OpenSceneGraph-3.0.1/src/osgViewer/ViewerBase.cpp	2012-03-05 21:10:09.483186500 +0100
@@ -553,6 +553,25 @@
     }
 }
 
+void ViewerBase::addCullBackgroundOperation(osg::Operation* operation)
+{
+    if (!operation) return;
+
+    if (!_cullBackgroundOperations) _cullBackgroundOperations = new osg::OperationQueue;
+    
+    _cullBackgroundOperations->add(operation);
+}
+
+void ViewerBase::removeCullBackgroundOperation(osg::Operation* operation)
+{
+    if (!operation) return;
+
+    if (_cullBackgroundOperations.valid())
+    {
+        _cullBackgroundOperations->remove(operation);
+    } 
+}
+
 void ViewerBase::setIncrementalCompileOperation(osgUtil::IncrementalCompileOperation* ico)
 {
     if (_incrementalCompileOperation == ico) return;
@@ -807,6 +826,11 @@
             (*itr)->runOperations();
         }
     }
+   
+    if (_cullBackgroundOperations.valid())
+    {
+        _cullBackgroundOperations->runOperations(this);
+    }
 
     // OSG_NOTICE<<"Joing _endRenderingDispatchBarrier block "<<_endRenderingDispatchBarrier.get()<<std::endl;
 
