Added support for texture object manager, which provides an automatic mechansim

for reusing deleted textures.
This commit is contained in:
Robert Osfield
2003-07-14 14:42:10 +00:00
parent 94d8e72ad3
commit 1b9d7d458a
18 changed files with 795 additions and 387 deletions

View File

@@ -538,9 +538,12 @@ void SceneView::draw()
// context we are in so can flush the appropriate caches.
osg::Drawable::flushDeletedDisplayLists(_state->getContextID());
osg::Drawable::flushDeletedVertexBufferObjects(_state->getContextID());
osg::Texture::flushDeletedTextureObjects(_state->getContextID());
osg::VertexProgram::flushDeletedVertexProgramObjects(_state->getContextID());
double currentTime = _state->getFrameStamp()?_state->getFrameStamp()->getReferenceTime():0.0;
osg::Texture::getTextureObjectManager()->deleteTextureObjects(_state->getContextID(),currentTime);
RenderLeaf* previous = NULL;
if (_displaySettings.valid() && _displaySettings->getStereo())
{