[osg-users] RenderOrder, RenderOrderNums

Johny Canes psijsma at gmail.com
Sun Aug 19 08:27:55 PDT 2018


The lack of docs makes this a bit of a guesser for me.

Does RenderOrder sort before RenderOrderNums (Macro / micro)?

Here is the functor taken from the Camera header

/** Functor to assist with ordering cameras 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();

So a camera with POST_RENDER will always render after PRE_RENDER, and then sorts further with the order num?

Tl;dr no matter how hard I try, I can't get the render orders to do anything that I want. Cameras show lagging behind a frame no matter how I try to order them or throw stuff around in the render loop. Help xd


Read this topic online here:

More information about the osg-users mailing list