Introduced new osg::discardDeletedOpenGLObjects() methods, and usage of it in

GrpahicsContext::close() to handle cases where deletingOpenGLObjects is no possible,
such as when GraphicsWindowEmbedded is used.
This commit is contained in:
Robert Osfield
2008-01-08 13:24:29 +00:00
parent f3448d3307
commit ff565128af
27 changed files with 216 additions and 29 deletions

View File

@@ -1977,6 +1977,13 @@ void Program::flushDeletedGlPrograms(unsigned int contextID,double /*currentTime
availableTime -= elapsedTime;
}
void Program::discardDeletedGlPrograms(unsigned int contextID)
{
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(s_mutex_deletedGlProgramCache);
GlProgramHandleList& pList = s_deletedGlProgramCache[contextID];
pList.clear();
}
///////////////////////////////////////////////////////////////////////////
// osg::Program