neuray API Programmer's Manual

mi::neuraylib::IRender_target_base Class Reference

[Rendering and Picking]

Description

Abstract interface for a render target (base class). This interface is the base class all render targets.

The render target holds an array of canvases. Each such canvas represents a layer in a framebuffer, e.g., one of them could be used to store the rendered color, another one for the z-buffer, and so on. Each of them can be tiled or not tiled.

A render mode can inquire the number of canvases passed in and their type. The types are used to determine the meaning of the canvas, e.g., TYPE_RESULT indicates the final image. See Section [:ipmlink reference Render target canvases] of the Iray Programmer's Manual for details.

Note that it is not guaranteed that all canvases have the same dimensions, though not all render modes have to support this.

See also:

mi::neuraylib::IRender_target, mi::neuraylib::IRender_context::render(), mi::neuraylib::IRender_context::render_async()

Public Member Functions

virtual const ICanvas_baseget_canvas( Uint32 index) const =0
Returns a canvas by index. More...
virtual ICanvas_baseget_canvas( Uint32 index) =0
Returns a canvas by index. More...
virtual Uint32 get_canvas_count() const =0
Returns the number of canvases to render to. More...
virtual const ICanvas_parametersget_canvas_parameters( Uint32 index) const =0
Returns a set of parameters of the given canvas. More...
virtual Canvas_type get_canvas_type( Uint32 index) const =0
Returns the type of the given canvas. More...

Member Functions

virtual const ICanvas_base* mi::​neuraylib::​IRender_target_base::get_canvas( Uint32 index) const [pure virtual]

Returns a canvas by index.

Parameters

index
The index of the requested canvas. Use mi::neuraylib::IRender_target_base::get_canvas_count() to inquire the number of canvases.

Returns

The requested canvas, or NULL if index is out of bounds.

virtual ICanvas_base* mi::​neuraylib::​IRender_target_base::get_canvas( Uint32 index) [pure virtual]

Returns a canvas by index.

Parameters

index
The index of the requested canvas. Use mi::neuraylib::IRender_target_base::get_canvas_count() to inquire the number of canvases.

Returns

The requested canvas, or NULL if index is out of bounds.

virtual Uint32 mi::​neuraylib::​IRender_target_base::get_canvas_count() const [pure virtual]

Returns the number of canvases to render to.

Returns

The number

virtual const ICanvas_parameters* mi::​neuraylib::​IRender_target_base::get_canvas_parameters( Uint32 index) const [pure virtual]

Returns a set of parameters of the given canvas. This function is used to query additional parameters associated with render target canvases. If a canvas does not support additional parameters or the canvas index is out of bounds, this function returns nullptr.

Parameters

index
The index of the requested canvas. Use get_canvas_count() to inquire the the number of canvases.

Returns

The parameter block as described above.

virtual Canvas_type mi::​neuraylib::​IRender_target_base::get_canvas_type( Uint32 index) const [pure virtual]

Returns the type of the given canvas.

Parameters

index
The index of the requested canvas. Use get_canvas_count() to inquire the the number of canvases.

Returns

The type of the requested canvas or mi::neuraylib::TYPE_UNDEFINED if index is out of bounds.