Multiple render contexts
Iray has core support for storing multiple scenes at the same time. Your application can use this for example to render a main scene and in addition render swatches for the available materials and update those swatches whenever the materials change. Many other use cases for this feature are conceivable.
In addition to multiple scenes, Iray also supports multiple render modes, and in fact comes with different render modes featuring different quality and speed properties (like Iray Photoreal, Iray Interactive, and Iray Realtime). As an application for this feature, you can for example choose one render mode for rendering during navigation and use a different render mode for rendering out a final image. It is also possible to blend between images generated by the different render modes. The Iray Blend render mode for example makes this very easy for you.
To enable the efficient use of those features, Iray allows you to have many render contexts at the same time. Each render context can be used to render a specific scene with a specific render mode. You can switch very fast between scenes or render modes by using the mi::neuraylib::IRender_context::render() function on one render context and when rendering is finished call render() on a second render context. In fact, it is also possible to call render() on a render context, while rendering is still active on other render contexts. Depending on the resource needs, the involved render modes, and the available resources, the rendering may in that case proceed in parallel, thus making more efficient use of the hardware resources.