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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user