Further work on occlusion culling.

This commit is contained in:
Robert Osfield
2002-06-13 23:46:02 +00:00
parent 8c5722577e
commit 61df1ed6b7
9 changed files with 203 additions and 70 deletions

View File

@@ -30,6 +30,10 @@ class SG_EXPORT CollectOccludersVisitor : public osg::NodeVisitor, public osg::C
virtual void apply(osg::LOD& node);
virtual void apply(osg::OccluderNode& node);
void setCreateDrawablesOnOccludeNodes(bool flag) { _createDrawables=flag; }
bool getCreateDrawablesOnOccludeNodes() const { return _createDrawables; }
void setCollectedOcculderList(const ShadowVolumeOccluderList& svol) { _occluderList = svol; }
ShadowVolumeOccluderList& getCollectedOccluderList() { return _occluderList; }
const ShadowVolumeOccluderList& getCollectedOccluderList() const { return _occluderList; }
@@ -43,7 +47,8 @@ class SG_EXPORT CollectOccludersVisitor : public osg::NodeVisitor, public osg::C
/** prevent unwanted copy operator.*/
CollectOccludersVisitor& operator = (const CollectOccludersVisitor&) { return *this; }
ShadowVolumeOccluderList _collectedOccluderList;
bool _createDrawables;
ShadowVolumeOccluderList _collectedOccluderList;
};

View File

@@ -35,7 +35,7 @@ class SG_EXPORT ShadowVolumeOccluder
/** compute the shadow volume occluder. */
bool computeOccluder(const NodePath& nodePath,const ConvexPlanerOccluder& occluder,CullStack& cullStack);
bool computeOccluder(const NodePath& nodePath,const ConvexPlanerOccluder& occluder,CullStack& cullStack,bool createDrawables=false);
inline void disableResultMasks();