From Jose Delport: "have been using the new VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY mode
of the OverlayNode. I change the overlay subgraph dynamically and when I remove all the subgraph nodes that is inside the current main camera FOV (others outside still exist), the overlay texture does not update because of the early return in the traversal. I then get a kind of ghost texture moving around the terrain. The attached file fixed the problem for me, but I'm not sure if it is the best way to address the problem."
This commit is contained in:
@@ -1501,8 +1501,14 @@ void OverlayNode::traverse_VIEW_DEPENDENT_WITH_ORTHOGRAPHIC_OVERLAY(osg::NodeVis
|
||||
#else
|
||||
overlayPolytope.computeSilhoette(lookVector, corners);
|
||||
#endif
|
||||
if (corners.empty()) return;
|
||||
|
||||
if (corners.empty())
|
||||
{
|
||||
camera->setClearColor(_overlayClearColor);
|
||||
//camera->setStateSet(overlayData._overlayStateSet.get());
|
||||
camera->accept(*cv);
|
||||
return;
|
||||
}
|
||||
|
||||
if (overlayData._geode.valid())
|
||||
{
|
||||
overlayData._geode->addDrawable(overlayPolytope.createDrawable(osg::Vec4d(1.0f,1.0f,1.0f,1.0f)));
|
||||
|
||||
Reference in New Issue
Block a user