Detailed Description

Iterates over all portals in a context and sets up new contexts to render the part of the scene "behind" the portal. Depending on the settings of a portal, it is either rendered to the same target as the context or a new texture (in which case the original context is augmented with a mesh rendering that texture).

Usage: instiate. Application after the visible meshes were determined, but before mesh sorting. Example:

The template parameter RenderTree gives the render tree type. The parameter ContextSetup gives a class used to set up the contexts for the rendering of the scene behind a portal. It must provide an implementation of operator() (RenderTree::ContextNode& context, PortalSetupType::ContextSetupData& portalSetupData).

Internal workings

The standard setup will classify portals into simple and heavy portals respectively where simple portals can be rendered directly without clipping while heavy portals requires render-to-texture.