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

@@ -30,6 +30,20 @@ ShadowTexture::ShadowTexture(const ShadowTexture& copy, const osg::CopyOp& copyo
{
}
void ShadowTexture::resizeGLObjectBuffers(unsigned int maxSize)
{
osg::resizeGLObjectBuffers(_camera, maxSize);
osg::resizeGLObjectBuffers(_texture, maxSize);
osg::resizeGLObjectBuffers(_stateset, maxSize);
}
void ShadowTexture::releaseGLObjects(osg::State* state) const
{
osg::releaseGLObjects(_camera, state);
osg::releaseGLObjects(_texture, state);
osg::releaseGLObjects(_stateset, state);
}
void ShadowTexture::setTextureUnit(unsigned int unit)
{
_textureUnit = unit;