NVIDIA IndeX API nvidia_logo_transpbg.gif Up
nv::index::IIndex_rendering Class Referenceabstract

Enables the rendering of a user-defined session/scene. More...

#include <iindex.h>

Inherits mi::base::Interface_declare< 0x435617a4, ... >.

Public Types

enum  Index_builtin_canvas_type {
  IDX_CANVAS_CUDA_MEMORY = 0u ,
  IDX_CANVAS_MAIN_MEMORY = 1u
}
 Internal built-in canvas types for external use in an application. More...
 

Public Member Functions

virtual IIndex_canvascreate_canvas (IIndex_canvas_creation_properties *properties) const =0
 Creates a built-in IIndex_canvas instance. More...
 
virtual IFrame_resultsrender (mi::neuraylib::Tag_struct session_tag, IIndex_canvas *canvas, mi::neuraylib::IDice_transaction *dice_transaction, IProgress_callback *progress=0, IFrame_info_callbacks *frame_info=0, bool composite_immediately=true, IApplication_depth_buffer *application_depth_buffer=0)=0
 Renders a frame of the scene and writes the resulting image tiles into the user-defined or a built-in IIndex_canvas. More...
 
virtual IFrame_results_listrender (mi::neuraylib::Tag_struct session_tag, IIndex_canvas *canvas, IViewport_list *viewport_list)=0
 Renders a frame of the scene and writes the resulting image tiles into the user-defined or a built-in IIndex_canvas. More...
 
virtual IFrame_results_listrender (mi::neuraylib::Tag_struct session_tag, ICanvas_viewport_list *canvas_viewport_list)=0
 Renders a frame of the scene and writes the resulting image tiles into multiple user-defined IIndex_canvas instances. More...
 
virtual bool cancel_rendering (const IFrame_identifier &frame_id)=0
 Cancel the rendering of a frame. More...
 

Detailed Description

Enables the rendering of a user-defined session/scene.

Member Enumeration Documentation

 Index_builtin_canvas_type

Internal built-in canvas types for external use in an application.

Enumerator
IDX_CANVAS_CUDA_MEMORY 

A canvas that allocates the framebuffer in CUDA memory.

IDX_CANVAS_MAIN_MEMORY 

A canvas that allocates the framebuffer in main memory.

Member Function Documentation

 cancel_rendering()

virtual bool nv::index::IIndex_rendering::cancel_rendering ( const IFrame_identifier frame_id)
pure virtual

Cancel the rendering of a frame.

Parameters
[in]frame_idThe frame identifier uniquely identifies a frame that has been started to be rendered.
Returns
Returns true if the frame has been canceled and false otherwise, e.g., the frame has already been rendered.

 create_canvas()

virtual IIndex_canvas * nv::index::IIndex_rendering::create_canvas ( IIndex_canvas_creation_properties properties) const
pure virtual

Creates a built-in IIndex_canvas instance.

While NVIDIA IndeX features the ability to implement user-defined canvases that the application can pass to the rendering process, NVIDIA IndeX can also create built-in canvases for use by an application. On the one hand, using a built-in canvas frees an integrator from implementing default canvases such as a simple main memory canvas. It should be noted, that built-in canvases can comprise specific capabilities such as a CUDA memory canvas to which NVIDIA IndeX composites its rendering results without ever transferring rendering results back to main memory.

Parameters
[in]propertiesDefines the specific canvas and additional properties for creating a canvas.
Returns
Returns a built-in canvas. The application takes ownership of the returned canvas.

 render() [1/3]

virtual IFrame_results_list * nv::index::IIndex_rendering::render ( mi::neuraylib::Tag_struct  session_tag,
ICanvas_viewport_list canvas_viewport_list 
)
pure virtual

Renders a frame of the scene and writes the resulting image tiles into multiple user-defined IIndex_canvas instances.

Each element of the given canvas/viewport-list pairs specifies a canvas as well as the associated viewports in that canvas. Each viewport's IScope enables variations in the scene between viewports.

Note
This method must always receive the list of all used canvases, even if some of them should not be rendered, to ensure proper cache handling. However, the viewports in the canvases that should be skipped for rendering can be disabled by calling IViewport::set_enable().
This method internally creates and commits a mi::neuraylib::IDice_transaction for each viewport and therefore all transactions editing the scene should be committed. Also, in contrast to the non-viewport version of this method, this one does not require IIndex_session::update() to be called.
Parameters
[in]session_tagThe ISession tag.
[in]canvas_viewport_listList of user-defined canvases with associated viewports.
Returns
Returns a list of frame results containing information gathered during the rendering process (e.g. error information and performance values) for each of the viewports.

 render() [2/3]

virtual IFrame_results_list * nv::index::IIndex_rendering::render ( mi::neuraylib::Tag_struct  session_tag,
IIndex_canvas canvas,
IViewport_list viewport_list 
)
pure virtual

Renders a frame of the scene and writes the resulting image tiles into the user-defined or a built-in IIndex_canvas.

Each element of the given viewport list specifies a target area on the canvas as well as an IScope, which enables variations in the scene between viewport.

The viewports are rendered in back-to-front order, i.e. when viewports bounding boxes overlap then a viewport in the list will be rendered on top of earlier list entries.

Note
This method internally creates and commits a mi::neuraylib::IDice_transaction for each viewport and therefore all transactions editing the scene should be committed. Also, in contrast to the non-viewport version of this method, this one does not require IIndex_session::update() to be called.
Parameters
[in]session_tagThe ISession tag.
[in]canvasThe user-defined canvas where all image tiles will be rendered into.
[in]viewport_listList of viewports that should be rendered.
Returns
Returns a list of frame results containing information gathered during the rendering process (e.g. error information and performance values) for each of the viewports.

 render() [3/3]

virtual IFrame_results * nv::index::IIndex_rendering::render ( mi::neuraylib::Tag_struct  session_tag,
IIndex_canvas canvas,
mi::neuraylib::IDice_transaction *  dice_transaction,
IProgress_callback progress = 0,
IFrame_info_callbacks frame_info = 0,
bool  composite_immediately = true,
IApplication_depth_buffer application_depth_buffer = 0 
)
pure virtual

Renders a frame of the scene and writes the resulting image tiles into the user-defined or a built-in IIndex_canvas.

This method assumes a single viewport that covers the entire canvas.

Note
IIndex_session::update() needs to be called before this method, using the same DiCE transaction.
Parameters
[in]session_tagThe ISession tag.
[in]canvasThe user-defined canvas where all image tiles will be rendered into.
[in]dice_transactionThe DiCE database transaction for this render call.
[in]progressThe progress callback to give feedback on the rendering process. The progress callback can be set to 0 if not needed.
[in]frame_infoCallback to receive details about the frames rendered, can be set to 0.
[in]composite_immediatelyDeprecated, should be set to true.
[in]application_depth_bufferDepth buffer of the application, with which the NVIDIA IndeX rendering should be integrated. Set to 0 if depth buffer integration is not required.
Returns
Returns a frame results interface containing information gathered during the rendering process (e.g. error information and performance values).

The documentation for this class was generated from the following file: