neuray Services API Programmer's Manual

Render Loops

[neuray Services API]

Description

Render loops allow for maximum resource utilization by performing rendering in a tight loop rather than on demand by the user. This allows for much faster progressive rendering convergence.

These interfaces are used in commands which wish to use render loops and by users who wish to implement their own render loop handlers.

Architecture

The render loop system consists of 3 layers.

  • Manager

The render loop manager, mi::nservices::IRender_loop_manager, is the main interface into render loops. Here render loops can be created and shutdown as well as render loop handlers registered with the system.

  • Render Loops

mi::nservices::IRender_loop represents an actual render loop. These are identified by name and created by the manager. After creation they need to be initialized, have initial handler specific parameters/render context options set and are then started. A new thread is created which then proceeds to render continuously. Other command can then access the render loop by name (again through the manager) to retrieve images, modify parameters or stop rendering.

  • Render Loop Handlers

Render loop handlers perform the actual rendering work. These can be user implemented or one of the built in handlers (default or falsecolor) can be used. Most calls on mi::nservices::IRender_loop are passed directly to the associated handler. To provide a custom handler users must implement mi::nservices::IRender_loop_handler then register its factory class via mi::nservices::IRender_loop_manager::register_render_loop_handler.

Usage

neuray Services ships with a complete set of commands that cover all render loop functionality. Users can simply call these to make use of render loops.

The complete source code to the default render handler is supplied as a reference for those who wish to implement their own render loop handlers.

Classes

class 
Represents a render loop. More...
class 
Defines a render loop handler. More...
class 
Factory class for creating render loop handlers. More...
class 
Management class for render loops. More...
class 
Abstract interface to report when the render loop has reached a specific counter. More...