Added releaseGLObjects(..) and resizeGLObjectBuffers(..) to osgShadow::ShadowTechnique's

This commit is contained in:
Robert Osfield
2016-02-04 17:52:44 +00:00
parent f373bcf23d
commit dcadd69c5a
20 changed files with 346 additions and 15 deletions

View File

@@ -53,6 +53,26 @@ ShadowVolume::~ShadowVolume()
{
}
void ShadowVolume::resizeGLObjectBuffers(unsigned int maxSize)
{
osg::resizeGLObjectBuffers(_occluder, maxSize);
osg::resizeGLObjectBuffers(_shadowVolume, maxSize);
osg::resizeGLObjectBuffers(_ss1, maxSize);
osg::resizeGLObjectBuffers(_mainShadowStateSet, maxSize);
osg::resizeGLObjectBuffers(_shadowVolumeStateSet, maxSize);
osg::resizeGLObjectBuffers(_shadowedSceneStateSet, maxSize);
}
void ShadowVolume::releaseGLObjects(osg::State* state) const
{
osg::releaseGLObjects(_occluder, state);
osg::releaseGLObjects(_shadowVolume, state);
osg::releaseGLObjects(_ss1, state);
osg::releaseGLObjects(_mainShadowStateSet, state);
osg::releaseGLObjects(_shadowVolumeStateSet, state);
osg::releaseGLObjects(_shadowedSceneStateSet, state);
}
void ShadowVolume::setDrawMode(osgShadow::ShadowVolumeGeometry::DrawMode drawMode)
{
if (_drawMode == drawMode) return;
@@ -351,6 +371,5 @@ void ShadowVolume::cull(osgUtil::CullVisitor& cv)
void ShadowVolume::cleanSceneGraph()
{
OSG_NOTICE<<className()<<"::cleanSceneGraph()) not implemented yet, but almost."<<std::endl;
}