Added release() to all GraphicsOperations in GraphicsThread.
This commit is contained in:
parent
2ea5d71d82
commit
6391691be6
@ -122,6 +122,19 @@ int GraphicsThread::cancel()
|
|||||||
// then wait for the the thread to stop running.
|
// then wait for the the thread to stop running.
|
||||||
while(isRunning())
|
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
|
// commenting out debug info as it was cashing crash on exit, presumable
|
||||||
// due to osg::notify or std::cout destructing earlier than this destructor.
|
// due to osg::notify or std::cout destructing earlier than this destructor.
|
||||||
osg::notify(osg::INFO)<<" Waiting for GraphicsThread to cancel "<<this<<std::endl;
|
osg::notify(osg::INFO)<<" Waiting for GraphicsThread to cancel "<<this<<std::endl;
|
||||||
|
@ -149,6 +149,8 @@ GraphicsContextImplementation::GraphicsContextImplementation(Traits* traits)
|
|||||||
|
|
||||||
//_rs->realize();
|
//_rs->realize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// _rs->useConfigEventThread(false);
|
||||||
|
|
||||||
_closeOnDestruction = true;
|
_closeOnDestruction = true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user