Added GraphicsContext::ResizedCallback and GraphicsContext::resizedImplementation.

Added message on non implementation of GraphicsContext::valid().
Added prelimary GraphicsContext clean up support.
This commit is contained in:
Robert Osfield
2007-01-08 16:20:10 +00:00
parent a3726fba66
commit 4a5eda6522
8 changed files with 143 additions and 10 deletions

View File

@@ -218,11 +218,13 @@ void TextureObjectManager::flushAllTextureObjects(unsigned int contextID)
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
Texture::TextureObjectList& tol = _textureObjectListMap[contextID];
osg::notify(osg::NOTICE)<<"Flushing texture objects num="<<tol.size()<<" contextID="<<contextID<<std::endl;
for(Texture::TextureObjectList::iterator itr=tol.begin();
itr!=tol.end();
++itr)
{
osg::notify(osg::NOTICE)<<" deleting texture object "<<(*itr)->_id<<std::endl;
glDeleteTextures( 1L, &((*itr)->_id));
}
tol.clear();
@@ -1302,6 +1304,9 @@ void Texture::resizeGLObjectBuffers(unsigned int maxSize)
void Texture::releaseGLObjects(State* state) const
{
if (state) osg::notify(osg::NOTICE)<<"Texture::releaseGLObjects contextID="<<state->getContextID()<<std::endl;
else osg::notify(osg::NOTICE)<<"Texture::releaseGLObjects no State "<<std::endl;
if (!state) const_cast<Texture*>(this)->dirtyTextureObject();
else
{