Changed the view movement detection code so that it uses the
new CullVisitor::Identifier to indentifier cull traversals, this enables the code to properly detect movement when osgViewer::Renderer uses double buffering of SceneView.
This commit is contained in:
parent
6e182e7c17
commit
79cb22eb06
@ -47,7 +47,7 @@ class OSGVOLUME_EXPORT RayTracedTechnique : public VolumeTechnique
|
||||
|
||||
osg::ref_ptr<osg::MatrixTransform> _transform;
|
||||
|
||||
typedef std::map<osgUtil::CullVisitor*, osg::Matrix> ModelViewMatrixMap;
|
||||
typedef std::map<osgUtil::CullVisitor::Identifier*, osg::Matrix> ModelViewMatrixMap;
|
||||
|
||||
OpenThreads::Mutex _mutex;
|
||||
ModelViewMatrixMap _modelViewMatrixMap;
|
||||
|
@ -553,7 +553,7 @@ void RayTracedTechnique::cull(osgUtil::CullVisitor* cv)
|
||||
bool moving = false;
|
||||
{
|
||||
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex);
|
||||
ModelViewMatrixMap::iterator itr = _modelViewMatrixMap.find(cv);
|
||||
ModelViewMatrixMap::iterator itr = _modelViewMatrixMap.find(cv->getIdentifier());
|
||||
if (itr!=_modelViewMatrixMap.end())
|
||||
{
|
||||
osg::Matrix newModelViewMatrix = *(cv->getModelViewMatrix());
|
||||
@ -564,7 +564,7 @@ void RayTracedTechnique::cull(osgUtil::CullVisitor* cv)
|
||||
}
|
||||
else
|
||||
{
|
||||
_modelViewMatrixMap[cv] = *(cv->getModelViewMatrix());
|
||||
_modelViewMatrixMap[cv->getIdentifier()] = *(cv->getModelViewMatrix());
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user