neuray Services API Programmer's Manual

mi::nservices::IRender_loop_manager Class Reference

[Render Loops]

Description

Management class for render loops. This is a neuray library API component that can be obtained via mi::neuraylib::INeuray::get_api_component or mi::neuraylib::IPlugin_api::get_api_component once neuray has been started. This class is used to create, manipulate and destroy render loops. Additionally, render handlers are registered here and then made available for use by render loops.

Public Member Functions

virtual IRender_loopcreate_render_loop( const char* name, const char* handler_name) =0
Creates a render loop under the given name. More...
virtual IRender_loopget_render_loop( const char* name) const =0
Retrieves a render loop under the given name. More...
virtual mi::Sint32 register_render_loop_handler( IRender_loop_handler_factory* factory) =0
Registers a render loop handler factory with the manager. More...
virtual bool  render_loop_exists( const char* name) const =0
Returns whether a render loop with the given name exists. More...
virtual bool  render_loop_handler_exists( const char* handler_name) const =0
Returns whether a render loop handler with the given name exists. More...
virtual mi::Sint32 shutdown_render_loop( const char* name) =0
Shutdown a running render loop. More...

Member Functions

virtual IRender_loop* mi::​nservices::​IRender_loop_manager::create_render_loop( const char* name, const char* handler_name) [pure virtual]

Creates a render loop under the given name.

Parameters

name
the name of the loop to create
handler_name
the name of the render loop handler to use when rendering

Returns

the loop or NULL on error, eg: if a loop already exists under name, or not initialized

virtual IRender_loop* mi::​nservices::​IRender_loop_manager::get_render_loop( const char* name) const [pure virtual]

Retrieves a render loop under the given name.

Parameters

name
the name of the loop

Returns

the loop or NULL on the loop is not found

virtual mi::Sint32 mi::​nservices::​IRender_loop_manager::register_render_loop_handler( IRender_loop_handler_factory* factory) [pure virtual]

Registers a render loop handler factory with the manager. A registered handler can later be created when creating a render loop.

Parameters

factory
the factory to register

Returns

  • 0 - success
  • -1 - failed
  • -2 - handler is NULL
  • -3 - a factory with this name is already registered

virtual bool mi::​nservices::​IRender_loop_manager::render_loop_exists( const char* name) const [pure virtual]

Returns whether a render loop with the given name exists.

Parameters

name
the name of the loop

Returns

true if it exists, false if not

virtual bool mi::​nservices::​IRender_loop_manager::render_loop_handler_exists( const char* handler_name) const [pure virtual]

Returns whether a render loop handler with the given name exists.

Parameters

handler_name
the name of the handler

Returns

true if it exists, false if not

virtual mi::Sint32 mi::​nservices::​IRender_loop_manager::shutdown_render_loop( const char* name) [pure virtual]

Shutdown a running render loop.

Parameters

name
the name of the loop

Returns

  • 0 - success
  • -1 - failed
  • -2 - invalid parameter, name is NULL or empty string
  • -3 - render loop not found