Added release() to all GraphicsOperations in GraphicsThread.

This commit is contained in:
Robert Osfield 2005-09-03 20:54:32 +00:00
parent 2ea5d71d82
commit 6391691be6
2 changed files with 15 additions and 0 deletions

View File

@ -122,6 +122,19 @@ int GraphicsThread::cancel()
// then wait for the the thread to stop running.
while(isRunning())
{
for(OperationQueue::iterator itr = _operations.begin();
itr != _operations.end();
++itr)
{
BarrierOperation* barrier = dynamic_cast<BarrierOperation*>(itr->get());
if (barrier)
{
barrier->release();
//barrier->invalidate();
osg::notify(osg::INFO)<<" Invalidating barrier "<<this<<std::endl;
}
}
// commenting out debug info as it was cashing crash on exit, presumable
// due to osg::notify or std::cout destructing earlier than this destructor.
osg::notify(osg::INFO)<<" Waiting for GraphicsThread to cancel "<<this<<std::endl;

View File

@ -149,6 +149,8 @@ GraphicsContextImplementation::GraphicsContextImplementation(Traits* traits)
//_rs->realize();
}
// _rs->useConfigEventThread(false);
_closeOnDestruction = true;
}