[osg-users] Per-Frame/per context operation

Sebastian Messerschmidt sebastian.messerschmidt at gmx.de
Thu Feb 18 06:07:06 PST 2016


Hi Robert,
> Hi Sebastian,
>
> The osg::GraphicsContext has a list of Operations that it runs on each 
> frame, so just add your Operation to the GraphicsContext via from 
> (include/osg/GraphicsContext header):
>
>         /** Add operation to end of OperationQueue.*/
>         void add(Operation* operation);
>
> This list is run after the Camera's assigned to the GraphicsContext. 
> See the GraphicsContext::runOperations() method in 
> src/osg/GraphicsContext.cpp.
>
> The other approach is to assign a Camera to the GraphicsContext that 
> has a subgraph that contains the operations you want to call.  The 
> advantage with this approach is that the Camera's are all sorted 
> according to their RenderOrder and RenderNumber, so you can control 
> render order.

That is exactly what I was looking for.
Thanks a lot.

Cheers
Sebastian



More information about the osg-users mailing list