Material Definition Language API nvidia_logo_transpbg.gif Up
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
mi::neuraylib::ITarget_code Class Referenceabstract

Represents target code of an MDL backend. More...

Inheritance diagram for mi::neuraylib::ITarget_code:
mi::base::Interface_declare< 0xefca46ae, 0xd530, 0x4b97, 0x9d, 0xab, 0x3a, 0xdb, 0x0c, 0x58, 0xc3, 0xac > mi::base::IInterface

Public Types

enum  State_usage_property {
  SU_POSITION = 0x0001u,
  SU_NORMAL = 0x0002u,
  SU_GEOMETRY_NORMAL = 0x0004u,
  SU_MOTION = 0x0008u,
  SU_TEXTURE_COORDINATE = 0x0010u,
  SU_TEXTURE_TANGENTS = 0x0020u,
  SU_TANGENT_SPACE = 0x0040u,
  SU_GEOMETRY_TANGENTS = 0x0080u,
  SU_DIRECTION = 0x0100u,
  SU_ANIMATION_TIME = 0x0200u,
  SU_ROUNDED_CORNER_NORMAL = 0x0400u,
  SU_ALL_VARYING_MASK = 0x07FFu,
  SU_TRANSFORMS = 0x0800u,
  SU_OBJECT_ID = 0x1000u,
  SU_ALL_UNIFORM_MASK = 0x1800u
}
 The potential state usage properties. More...
 
enum  Texture_shape
 Possible texture shapes. More...
 
enum  Prototype_language
 Language to use for the callable function prototype. More...
 
enum  Distribution_kind
 Possible kinds of distribution functions. More...
 
enum  Function_kind
 Possible kinds of callable functions. More...
 
enum  Gamma_mode
 Possible texture gamma modes. More...
 
- Public Types inherited from mi::base::Interface_declare< 0xefca46ae, 0xd530, 0x4b97, 0x9d, 0xab, 0x3a, 0xdb, 0x0c, 0x58, 0xc3, 0xac >
typedef Interface_declare< id1,
id2, id3, id4, id5, id6, id7,
id8, id9, id10, id11,
IInterface
Self
 Own type. More...
 
typedef Uuid_t< id1, id2, id3,
id4, id5, id6, id7, id8, id9,
id10, id11 > 
IID
 Declares the interface ID (IID) of this interface. More...
 
- Public Types inherited from mi::base::IInterface
typedef Uuid_t< 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 > IID
 Declares the interface ID (IID) of this interface. More...
 

Public Member Functions

virtual const char * get_code () const =0
 Returns the represented target code in ASCII representation. More...
 
virtual Size get_code_size () const =0
 Returns the length of the represented target code. More...
 
virtual Size get_callable_function_count () const =0
 Returns the number of callable functions in the target code. More...
 
virtual const char * get_callable_function (Size index) const =0
 Returns the name of a callable function in the target code. More...
 
virtual Size get_texture_count () const =0
 Returns the number of texture resources used by the target code. More...
 
virtual const char * get_texture (Size index) const =0
 Returns the name of a texture resource used by the target code. More...
 
virtual const char * get_texture_url (Size index) const =0
 Returns the mdl url of a texture resource used by the target code. More...
 
virtual const char * get_texture_owner_module (Size index) const =0
 Returns the owner module name of a relative texture url. More...
 
virtual Gamma_mode get_texture_gamma (Size index) const =0
 Returns the gamma mode of a texture resource used by the target code. More...
 
virtual Texture_shape get_texture_shape (Size index) const =0
 Returns the texture shape of a given texture resource used by the target code. More...
 
virtual Size get_ro_data_segment_count () const =0
 Returns the number of constant data initializers. More...
 
virtual const char * get_ro_data_segment_name (Size index) const =0
 Returns the name of the constant data segment at the given index. More...
 
virtual Size get_ro_data_segment_size (Size index) const =0
 Returns the size of the constant data segment at the given index. More...
 
virtual const char * get_ro_data_segment_data (Size index) const =0
 Returns the data of the constant data segment at the given index. More...
 
virtual Size get_code_segment_count () const =0
 Returns the number of code segments of the target code. More...
 
virtual const char * get_code_segment (Size index) const =0
 Returns the represented target code segment in ASCII representation. More...
 
virtual Size get_code_segment_size (Size index) const =0
 Returns the length of the represented target code segment. More...
 
virtual const char * get_code_segment_description (Size index) const =0
 Returns the description of the target code segment. More...
 
virtual State_usage get_render_state_usage () const =0
 Returns the potential render state usage of the target code. More...
 
virtual Size get_argument_block_count () const =0
 Returns the number of target argument blocks / block layouts. More...
 
virtual const
ITarget_argument_block
get_argument_block (Size index) const =0
 Get a target argument block if available. More...
 
virtual ITarget_argument_blockcreate_argument_block (Size index, const ICompiled_material *material, ITarget_resource_callback *resource_callback) const =0
 Create a new target argument block of the class-compiled material for this target code. More...
 
virtual const
ITarget_value_layout
get_argument_block_layout (Size index) const =0
 Get a captured arguments block layout if available. More...
 
virtual Size get_light_profile_count () const =0
 Returns the number of light profile resources used by the target code. More...
 
virtual const char * get_light_profile (Size index) const =0
 Returns the name of a light profile resource used by the target code. More...
 
virtual Size get_bsdf_measurement_count () const =0
 Returns the number of bsdf measurement resources used by the target code. More...
 
virtual const char * get_bsdf_measurement (Size index) const =0
 Returns the name of a bsdf measurement resource used by the target code. More...
 
virtual Size get_string_constant_count () const =0
 Returns the number of string constants used by the target code. More...
 
virtual const char * get_string_constant (Size index) const =0
 Returns the string constant used by the target code. More...
 
virtual Uint32 get_known_resource_index (ITransaction *transaction, IValue_resource const *resource) const =0
 Returns the resource index for use in an ITarget_argument_block of resources already known when this ITarget_code object was generated. More...
 
virtual const char * get_callable_function_prototype (Size index, Prototype_language lang) const =0
 Returns the prototype of a callable function in the target code. More...
 
virtual Distribution_kind get_callable_function_distribution_kind (Size index) const =0
 Returns the distribution kind of a callable function in the target code. More...
 
virtual Function_kind get_callable_function_kind (Size index) const =0
 Returns the function kind of a callable function in the target code. More...
 
virtual Size get_callable_function_argument_block_index (Size index) const =0
 Get the index of the target argument block to use with a callable function. More...
 
virtual Sint32 execute_environment (Size index, const Shading_state_environment &state, Texture_handler_base *tex_handler, Spectrum_struct *result) const =0
 Run this code on the native CPU. More...
 
virtual Sint32 execute (Size index, const Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args, void *result) const =0
 Run this code on the native CPU with the given captured arguments block. More...
 
virtual Sint32 execute_bsdf_init (Size index, Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args) const =0
 Run the BSDF init function for this code on the native CPU. More...
 
virtual Sint32 execute_bsdf_sample (Size index, Bsdf_sample_data *data, const Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args) const =0
 Run the BSDF sample function for this code on the native CPU. More...
 
virtual Sint32 execute_bsdf_evaluate (Size index, Bsdf_evaluate_data *data, const Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args) const =0
 Run the BSDF evaluation function for this code on the native CPU. More...
 
virtual Sint32 execute_bsdf_pdf (Size index, Bsdf_pdf_data *data, const Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args) const =0
 Run the BSDF PDF calculation function for this code on the native CPU. More...
 
virtual Sint32 execute_edf_init (Size index, Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args) const =0
 Run the EDF init function for this code on the native CPU. More...
 
virtual Sint32 execute_edf_sample (Size index, Edf_sample_data *data, const Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args) const =0
 Run the EDF sample function for this code on the native CPU. More...
 
virtual Sint32 execute_edf_evaluate (Size index, Edf_evaluate_data *data, const Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args) const =0
 Run the EDF evaluation function for this code on the native CPU. More...
 
virtual Sint32 execute_edf_pdf (Size index, Edf_pdf_data *data, const Shading_state_material &state, Texture_handler_base *tex_handler, const ITarget_argument_block *cap_args) const =0
 Run the EDF PDF calculation function for this code on the native CPU. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from mi::base::Interface_declare< 0xefca46ae, 0xd530, 0x4b97, 0x9d, 0xab, 0x3a, 0xdb, 0x0c, 0x58, 0xc3, 0xac >
static bool compare_iid (const Uuid &iid)
 Compares the interface ID iid against the interface ID of this interface and of its ancestors. More...
 

Detailed Description

Represents target code of an MDL backend.

Member Enumeration Documentation

Possible kinds of distribution functions.

Possible kinds of callable functions.

Possible texture gamma modes.

Language to use for the callable function prototype.

The potential state usage properties.

Enumerator
SU_POSITION 

uses state::position()

SU_NORMAL 

uses state::normal()

SU_GEOMETRY_NORMAL 

uses state::geometry_normal()

SU_MOTION 

uses state::motion()

SU_TEXTURE_COORDINATE 

uses state::texture_coordinate()

SU_TEXTURE_TANGENTS 

uses state::texture_tangent_*()

SU_TANGENT_SPACE 

uses state::tangent_space()

SU_GEOMETRY_TANGENTS 

uses state::geometry_tangent_*()

SU_DIRECTION 

uses state::direction()

SU_ANIMATION_TIME 

uses state::animation_time()

SU_ROUNDED_CORNER_NORMAL 

uses state::rounded_corner_normal()

SU_ALL_VARYING_MASK 

set of varying states

SU_TRANSFORMS 

uses uniform state::transform*()

SU_OBJECT_ID 

uses uniform state::object_id()

SU_ALL_UNIFORM_MASK 

set of uniform states

Possible texture shapes.

Member Function Documentation

virtual ITarget_argument_block* mi::neuraylib::ITarget_code::create_argument_block ( Size  index,
const ICompiled_material material,
ITarget_resource_callback resource_callback 
) const
pure virtual

Create a new target argument block of the class-compiled material for this target code.

Parameters
indexThe index of the base target argument block of this target code.
materialThe class-compiled MDL material which has to fit to this ITarget_code, i.e. the hash of the compiled material must be identical to the one used to generate this ITarget_code.
resource_callbackCallback for retrieving resource indices for resource values.
Returns
the generated target argument block or NULL if no arguments were captured or the index was invalid.
virtual Sint32 mi::neuraylib::ITarget_code::execute ( Size  index,
const Shading_state_material state,
Texture_handler_base tex_handler,
const ITarget_argument_block cap_args,
void *  result 
) const
pure virtual

Run this code on the native CPU with the given captured arguments block.

Parameters
[in]indexThe index of the callable function.
[in]stateThe core state.
[in]tex_handlerTexture handler containing the vtable for the user-defined texture lookup functions. Can be NULL if the built-in resource handler is used.
[in]cap_argsThe captured arguments to use for the execution. If cap_args is NULL, the captured arguments of this ITarget_code object will be used, if any.
[out]resultThe result will be written to.
Returns
  • 0 on success
  • -1 if execution was aborted by runtime error
  • -2 cannot execute: not native code or the given index does not refer to a material expression
Note
This allows to execute any compiled function on the CPU. The result must be big enough to take the functions result.
virtual Sint32 mi::neuraylib::ITarget_code::execute_bsdf_evaluate ( Size  index,
Bsdf_evaluate_data data,
const Shading_state_material state,
Texture_handler_base tex_handler,
const ITarget_argument_block cap_args 
) const
pure virtual

Run the BSDF evaluation function for this code on the native CPU.

Parameters
[in]indexThe index of the callable function.
[in,out]dataThe input and output fields for the BSDF evaluation.
[in]stateThe core state.
[in]tex_handlerTexture handler containing the vtable for the user-defined texture lookup functions. Can be NULL if the built-in resource handler is used.
[in]cap_argsThe captured arguments to use for the execution. If cap_args is NULL, the captured arguments of this ITarget_code object for the given callable function will be used, if any.
Returns
  • 0 on success
  • -1 if execution was aborted by runtime error
  • -2 cannot execute: not native code or the given function is not a BSDF evaluation function
virtual Sint32 mi::neuraylib::ITarget_code::execute_bsdf_init ( Size  index,
Shading_state_material state,
Texture_handler_base tex_handler,
const ITarget_argument_block cap_args 
) const
pure virtual

Run the BSDF init function for this code on the native CPU.

This function updates the normal field of the shading state with the result of "geometry.normal" and, if the "num_texture_results" backend option has been set to non-zero, fills the text_results fields of the state.

Parameters
[in]indexThe index of the callable function.
[in]stateThe core state.
[in]tex_handlerTexture handler containing the vtable for the user-defined texture lookup functions. Can be NULL if the built-in resource handler is used.
[in]cap_argsThe captured arguments to use for the execution. If cap_args is NULL, the captured arguments of this ITarget_code object for the given callable function will be used, if any.
Returns
  • 0 on success
  • -1 if execution was aborted by runtime error
  • -2 cannot execute: not native code or the given function is not a BSDF init function
virtual Sint32 mi::neuraylib::ITarget_code::execute_bsdf_pdf ( Size  index,
Bsdf_pdf_data data,
const Shading_state_material state,
Texture_handler_base tex_handler,
const ITarget_argument_block cap_args 
) const
pure virtual

Run the BSDF PDF calculation function for this code on the native CPU.

Parameters
[in]indexThe index of the callable function.
[in,out]dataThe input and output fields for the BSDF PDF calculation.
[in]stateThe core state.
[in]tex_handlerTexture handler containing the vtable for the user-defined texture lookup functions. Can be NULL if the built-in resource handler is used.
[in]cap_argsThe captured arguments to use for the execution. If cap_args is NULL, the captured arguments of this ITarget_code object for the given callable function will be used, if any.
Returns
  • 0 on success
  • -1 if execution was aborted by runtime error
  • -2 cannot execute: not native code or the given function is not a BSDF PDF calculation function
virtual Sint32 mi::neuraylib::ITarget_code::execute_bsdf_sample ( Size  index,
Bsdf_sample_data data,
const Shading_state_material state,
Texture_handler_base tex_handler,
const ITarget_argument_block cap_args 
) const
pure virtual

Run the BSDF sample function for this code on the native CPU.

Parameters
[in]indexThe index of the callable function.
[in,out]dataThe input and output fields for the BSDF sampling.
[in]stateThe core state.
[in]tex_handlerTexture handler containing the vtable for the user-defined texture lookup functions. Can be NULL if the built-in resource handler is used.
[in]cap_argsThe captured arguments to use for the execution. If cap_args is NULL, the captured arguments of this ITarget_code object for the given callable function will be used, if any.
Returns
  • 0 on success
  • -1 if execution was aborted by runtime error
  • -2 cannot execute: not native code or the given function is not a BSDF sample function
virtual Sint32 mi::neuraylib::ITarget_code::execute_edf_evaluate ( Size  index,
Edf_evaluate_data data,
const Shading_state_material state,
Texture_handler_base tex_handler,
const ITarget_argument_block cap_args 
) const
pure virtual

Run the EDF evaluation function for this code on the native CPU.

Parameters
[in]indexThe index of the callable function.
[in,out]dataThe input and output fields for the EDF evaluation.
[in]stateThe core state.
[in]tex_handlerTexture handler containing the vtable for the user-defined texture lookup functions. Can be NULL if the built-in resource handler is used.
[in]cap_argsThe captured arguments to use for the execution. If cap_args is NULL, the captured arguments of this ITarget_code object for the given callable function will be used, if any.
Returns
  • 0 on success
  • -1 if execution was aborted by runtime error
  • -2 cannot execute: not native code or the given function is not a EDF evaluation function
virtual Sint32 mi::neuraylib::ITarget_code::execute_edf_init ( Size  index,
Shading_state_material state,
Texture_handler_base tex_handler,
const ITarget_argument_block cap_args 
) const
pure virtual

Run the EDF init function for this code on the native CPU.

This function updates the normal field of the shading state with the result of "geometry.normal" and, if the "num_texture_results" backend option has been set to non-zero, fills the text_results fields of the state.

Parameters
[in]indexThe index of the callable function.
[in]stateThe core state.
[in]tex_handlerTexture handler containing the vtable for the user-defined texture lookup functions. Can be NULL if the built-in resource handler is used.
[in]cap_argsThe captured arguments to use for the execution. If cap_args is NULL, the captured arguments of this ITarget_code object for the given callable function will be used, if any.
Returns
  • 0 on success
  • -1 if execution was aborted by runtime error
  • -2 cannot execute: not native code or the given function is not a EDF init function
virtual Sint32 mi::neuraylib::ITarget_code::execute_edf_pdf ( Size  index,
Edf_pdf_data data,
const Shading_state_material state,
Texture_handler_base tex_handler,
const ITarget_argument_block cap_args 
) const
pure virtual

Run the EDF PDF calculation function for this code on the native CPU.

Parameters
[in]indexThe index of the callable function.
[in,out]dataThe input and output fields for the EDF PDF calculation.
[in]stateThe core state.
[in]tex_handlerTexture handler containing the vtable for the user-defined texture lookup functions. Can be NULL if the built-in resource handler is used.
[in]cap_argsThe captured arguments to use for the execution. If cap_args is NULL, the captured arguments of this ITarget_code object for the given callable function will be used, if any.
Returns
  • 0 on success
  • -1 if execution was aborted by runtime error
  • -2 cannot execute: not native code or the given function is not a EDF PDF calculation function
virtual Sint32 mi::neuraylib::ITarget_code::execute_edf_sample ( Size  index,
Edf_sample_data data,
const Shading_state_material state,
Texture_handler_base tex_handler,
const ITarget_argument_block cap_args 
) const
pure virtual

Run the EDF sample function for this code on the native CPU.

Parameters
[in]indexThe index of the callable function.
[in,out]dataThe input and output fields for the EDF sampling.
[in]stateThe core state.
[in]tex_handlerTexture handler containing the vtable for the user-defined texture lookup functions. Can be NULL if the built-in resource handler is used.
[in]cap_argsThe captured arguments to use for the execution. If cap_args is NULL, the captured arguments of this ITarget_code object for the given callable function will be used, if any.
Returns
  • 0 on success
  • -1 if execution was aborted by runtime error
  • -2 cannot execute: not native code or the given function is not a EDF sample function
virtual Sint32 mi::neuraylib::ITarget_code::execute_environment ( Size  index,
const Shading_state_environment state,
Texture_handler_base tex_handler,
Spectrum_struct result 
) const
pure virtual

Run this code on the native CPU.

Parameters
[in]indexThe index of the callable function.
[in]stateThe core state.
[in]tex_handlerTexture handler containing the vtable for the user-defined texture lookup functions. Can be NULL if the built-in resource handler is used.
[out]resultThe result will be written to.
Returns
  • 0 on success
  • -1 if execution was aborted by runtime error
  • -2 cannot execute: not native code or the given index does not refer to an environment function.
Note
This allows to execute any compiled function on the CPU.
virtual const ITarget_argument_block* mi::neuraylib::ITarget_code::get_argument_block ( Size  index) const
pure virtual

Get a target argument block if available.

Parameters
indexThe index of the target argument block.
Returns
the captured argument block or NULL if no arguments were captured or the index was invalid.
virtual Size mi::neuraylib::ITarget_code::get_argument_block_count ( ) const
pure virtual

Returns the number of target argument blocks / block layouts.

virtual const ITarget_value_layout* mi::neuraylib::ITarget_code::get_argument_block_layout ( Size  index) const
pure virtual

Get a captured arguments block layout if available.

Parameters
indexThe index of the target argument block.
Returns
the layout or NULL if no arguments were captured or the index was invalid.
virtual const char* mi::neuraylib::ITarget_code::get_bsdf_measurement ( Size  index) const
pure virtual

Returns the name of a bsdf measurement resource used by the target code.

Parameters
indexThe index of the texture resource.
Returns
The name of the DB element associated the bsdf measurement resource of the given index, or NULL if index is out of range.
virtual Size mi::neuraylib::ITarget_code::get_bsdf_measurement_count ( ) const
pure virtual

Returns the number of bsdf measurement resources used by the target code.

virtual const char* mi::neuraylib::ITarget_code::get_callable_function ( Size  index) const
pure virtual

Returns the name of a callable function in the target code.

The name of a callable function is specified via the fname parameter of mi::neuraylib::IMdl_backend::translate_environment() and mi::neuraylib::IMdl_backend::translate_material_expression().

Parameters
indexThe index of the callable function.
Returns
The name of the index -th callable function, or NULL if index is out of bounds.
virtual Size mi::neuraylib::ITarget_code::get_callable_function_argument_block_index ( Size  index) const
pure virtual

Get the index of the target argument block to use with a callable function.

Note
All DF_* functions of one material DF use the same target argument block.
Parameters
indexThe index of the callable function.
Returns
The index of the target argument block for this function or ~0 if not used.
virtual Size mi::neuraylib::ITarget_code::get_callable_function_count ( ) const
pure virtual

Returns the number of callable functions in the target code.

virtual Distribution_kind mi::neuraylib::ITarget_code::get_callable_function_distribution_kind ( Size  index) const
pure virtual

Returns the distribution kind of a callable function in the target code.

Parameters
indexThe index of the callable function.
Returns
The distribution kind of the callable function or DK_INVALID if index was invalid.
virtual Function_kind mi::neuraylib::ITarget_code::get_callable_function_kind ( Size  index) const
pure virtual

Returns the function kind of a callable function in the target code.

Parameters
indexThe index of the callable function.
Returns
The kind of the callable function or FK_INVALID if index was invalid.
virtual const char* mi::neuraylib::ITarget_code::get_callable_function_prototype ( Size  index,
Prototype_language  lang 
) const
pure virtual

Returns the prototype of a callable function in the target code.

Parameters
indexThe index of the callable function.
langThe language to use for the prototype.
Returns
The prototype or NULL if index is out of bounds or lang cannot be used for this target code.
virtual const char* mi::neuraylib::ITarget_code::get_code ( ) const
pure virtual

Returns the represented target code in ASCII representation.

virtual const char* mi::neuraylib::ITarget_code::get_code_segment ( Size  index) const
pure virtual

Returns the represented target code segment in ASCII representation.

Parameters
indexThe index of the code segment.
Returns
The code segment or NULL if the index is out of bounds.
virtual Size mi::neuraylib::ITarget_code::get_code_segment_count ( ) const
pure virtual

Returns the number of code segments of the target code.

virtual const char* mi::neuraylib::ITarget_code::get_code_segment_description ( Size  index) const
pure virtual

Returns the description of the target code segment.

Parameters
indexThe index of the code segment.
Returns
The code segment description or NULL if the index is out of bounds.
virtual Size mi::neuraylib::ITarget_code::get_code_segment_size ( Size  index) const
pure virtual

Returns the length of the represented target code segment.

Parameters
indexThe index of the code segment.
Returns
The size of the code segment or 0 if the index is out of bounds.
virtual Size mi::neuraylib::ITarget_code::get_code_size ( ) const
pure virtual

Returns the length of the represented target code.

virtual Uint32 mi::neuraylib::ITarget_code::get_known_resource_index ( ITransaction transaction,
IValue_resource const *  resource 
) const
pure virtual

Returns the resource index for use in an ITarget_argument_block of resources already known when this ITarget_code object was generated.

Parameters
transactionTransaction to retrieve resource names from tags.
resourceThe resource value.
virtual const char* mi::neuraylib::ITarget_code::get_light_profile ( Size  index) const
pure virtual

Returns the name of a light profile resource used by the target code.

Parameters
indexThe index of the texture resource.
Returns
The name of the DB element associated the light profile resource of the given index, or NULL if index is out of range.
virtual Size mi::neuraylib::ITarget_code::get_light_profile_count ( ) const
pure virtual

Returns the number of light profile resources used by the target code.

virtual State_usage mi::neuraylib::ITarget_code::get_render_state_usage ( ) const
pure virtual

Returns the potential render state usage of the target code.

If the corresponding property bit is not set, it is guaranteed that the code does not use the associated render state property.

virtual Size mi::neuraylib::ITarget_code::get_ro_data_segment_count ( ) const
pure virtual

Returns the number of constant data initializers.

virtual const char* mi::neuraylib::ITarget_code::get_ro_data_segment_data ( Size  index) const
pure virtual

Returns the data of the constant data segment at the given index.

Parameters
indexThe index of the data segment.
Returns
The data of the constant data segment or NULL if the index is out of bounds.
virtual const char* mi::neuraylib::ITarget_code::get_ro_data_segment_name ( Size  index) const
pure virtual

Returns the name of the constant data segment at the given index.

Parameters
indexThe index of the data segment.
Returns
The name of the constant data segment or NULL if the index is out of bounds.
virtual Size mi::neuraylib::ITarget_code::get_ro_data_segment_size ( Size  index) const
pure virtual

Returns the size of the constant data segment at the given index.

Parameters
indexThe index of the data segment.
Returns
The size of the constant data segment or 0 if the index is out of bounds.
virtual const char* mi::neuraylib::ITarget_code::get_string_constant ( Size  index) const
pure virtual

Returns the string constant used by the target code.

Parameters
indexThe index of the string constant.
Returns
The string constant that is represented by the given index, or NULL if index is out of range.
virtual Size mi::neuraylib::ITarget_code::get_string_constant_count ( ) const
pure virtual

Returns the number of string constants used by the target code.

virtual const char* mi::neuraylib::ITarget_code::get_texture ( Size  index) const
pure virtual

Returns the name of a texture resource used by the target code.

Parameters
indexThe index of the texture resource.
Returns
The name of the DB element associated the texture resource of the given index, or NULL if index is out of range or the texture does not exist. in the database.
virtual Size mi::neuraylib::ITarget_code::get_texture_count ( ) const
pure virtual

Returns the number of texture resources used by the target code.

virtual Gamma_mode mi::neuraylib::ITarget_code::get_texture_gamma ( Size  index) const
pure virtual

Returns the gamma mode of a texture resource used by the target code.

Parameters
indexThe index of the texture resource.
Returns
The gamma of the texture resource of the given index, or NULL if index is out of range.
virtual const char* mi::neuraylib::ITarget_code::get_texture_owner_module ( Size  index) const
pure virtual

Returns the owner module name of a relative texture url.

Parameters
indexThe index of the texture resource.
Returns
The owner module name of the texture resource of the given index, or NULL if index is out of range or the owner module is not provided.
virtual Texture_shape mi::neuraylib::ITarget_code::get_texture_shape ( Size  index) const
pure virtual

Returns the texture shape of a given texture resource used by the target code.

Parameters
indexThe index of the texture resource.
Returns
The shape of the texture resource of the given index, or Texture_shape_invalid if index is out of range.
virtual const char* mi::neuraylib::ITarget_code::get_texture_url ( Size  index) const
pure virtual

Returns the mdl url of a texture resource used by the target code.

Parameters
indexThe index of the texture resource.
Returns
The mdl url of the texture resource of the given index, or NULL if index is out of range.