Further work on osgShadow::GeometryOccluder

This commit is contained in:
Robert Osfield
2006-11-10 15:07:13 +00:00
parent d23c04018b
commit 8983544a86
4 changed files with 230 additions and 435 deletions

View File

@@ -79,7 +79,9 @@ class OSG_EXPORT Material : public StateAttribute
virtual bool getModeUsage(ModeUsage& usage) const
{
usage.usesMode(GL_COLOR_MATERIAL);
// note, since Material does it's own glEnable/glDisable of GL_COLOR_MATERIAL
// we shouldn't declare usage of that mode, so commenting out the below usage.
// usage.usesMode(GL_COLOR_MATERIAL);
return true;
}

View File

@@ -68,14 +68,16 @@ class OSGSHADOW_EXPORT OccluderGeometry : public osg::Drawable
/** Compute an occluder geometry containing all the geometry in specified subgraph.*/
void computeOccluderGeometry(osg::Node* subgraph, float sampleRatio=1.0f);
void computeOccluderGeometry(osg::Node* subgraph, osg::Matrix* matrix=0, float sampleRatio=1.0f);
/** Compute an occluder geometry containing the geometry in specified drawable.*/
void computeOccluderGeometry(osg::Drawable* drawable, float sampleRatio=1.0f);
void computeOccluderGeometry(osg::Drawable* drawable, osg::Matrix* matrix=0, float sampleRatio=1.0f);
/** Render the occluder geometry. */
virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
/** Compute the bounding box around occluder geometry.*/
virtual osg::BoundingBox computeBound() const;
protected :