neuray Services API Programmer's Manual

mi::nservices::IRender_loop_rendered_callback Class Reference

[Render Loops]

Description

Abstract interface called whenever a render loop renders a canvas.

Public Member Functions

virtual bool  rendered( const IRender_loop_handler_render_result* result, const mi::IMap* progress, mi::neuraylib::ITransaction* transaction, bool transaction_blocked) =0
This is called when a result has been rendered. More...
virtual void shutdown() =0
Called when the render loop is complete and about to shutdown.

Member Functions

virtual bool mi::​nservices::​IRender_loop_rendered_callback::rendered( const IRender_loop_handler_render_result* result, const mi::IMap* progress, mi::neuraylib::ITransaction* transaction, bool transaction_blocked) [pure virtual]

This is called when a result has been rendered.

Parameters

result
render result containing the renders. progress a map containing the progress of the result. All values will be mi::IFloat64 transaction a transaction into the render loop scope, the handler can make scene changes here if desired. If changes are made the transaction should be committed to ensure the render loop is reset.
progress
transaction
transaction_blocked
if true, the transaction is currently in use by another thread and should not be committed. Typically this is used when canvases are rendered asynchronously from each other.

Returns

return true if transaction has been used to edit the scene to ensure rendering continues. Return false if no changes are made.

virtual void mi::​nservices::​IRender_loop_rendered_callback::shutdown() [pure virtual]

Called when the render loop is complete and about to shutdown.