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:
@@ -680,6 +680,19 @@ class OSG_EXPORT Camera : public Transform, public CullSettings
|
||||
ref_ptr<DrawCallback> _finalDrawCallback;
|
||||
};
|
||||
|
||||
|
||||
/** Functor to assist with ordering camers in the order they should be rendered in.*/
|
||||
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();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user