Added a render order sort to the list of Cameras being tested by the *Viewer::generatePointerData(..) method to ensure that the highest Camera gets focus.

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14309 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2014-06-27 15:30:56 +00:00
parent d994e84288
commit 8d6bee6da9
4 changed files with 60 additions and 33 deletions

View File

@@ -754,18 +754,6 @@ void GraphicsContext::removeAllOperations()
_operationsBlock->set(false);
}
struct CameraRenderOrderSortOp
{
inline bool operator() (const Camera* lhs,const Camera* rhs) const
{
if (lhs->getRenderOrder()<rhs->getRenderOrder()) return true;
if (rhs->getRenderOrder()<lhs->getRenderOrder()) return false;
return lhs->getRenderOrderNum()<rhs->getRenderOrderNum();
}
};
void GraphicsContext::runOperations()
{
// sort the cameras into order