Further work on Occlusion Culling. Most of work is complete, just debugging
required now.
This commit is contained in:
@@ -546,7 +546,7 @@ void CullVisitor::apply(osg::OccluderNode& node)
|
||||
// list, if so disable the appropriate ShadowOccluderVolume
|
||||
disableOccluder(_nodePath);
|
||||
|
||||
std::cout<<"CullVisitor:: We are in an Occlusion node"<<&node<<std::endl;
|
||||
// std::cout<<"CullVisitor:: We are in an Occlusion node"<<&node<<std::endl;
|
||||
|
||||
|
||||
if (isCulled(node)) return;
|
||||
|
||||
@@ -310,7 +310,8 @@ void SceneView::cullStage(osg::Matrix* projection,osg::Matrix* modelview,osgUtil
|
||||
// collect any occluder in the view frustum.
|
||||
if (_sceneData->containsOccluderNodes())
|
||||
{
|
||||
std::cout << "Scene graph contains occluder nodes, searching for them"<<std::endl;
|
||||
//std::cout << "Scene graph contains occluder nodes, searching for them"<<std::endl;
|
||||
|
||||
osg::CollectOccludersVisitor cov;
|
||||
|
||||
cov.setFrameStamp(_frameStamp.get());
|
||||
@@ -331,8 +332,10 @@ void SceneView::cullStage(osg::Matrix* projection,osg::Matrix* modelview,osgUtil
|
||||
cov.popModelViewMatrix();
|
||||
cov.popProjectionMatrix();
|
||||
cov.popViewport();
|
||||
|
||||
std::cout << "finished searching for occluder"<<std::endl;
|
||||
|
||||
// std::cout << "finished searching for occluder"<<std::endl;
|
||||
|
||||
cullVisitor->setOccluderList(cov.getCollectedOccluderList());
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user