Defines headers that can be included by rendering kernel programs.
More...
#include <irendering_kernel_programs.h>
Inherits mi::base::Interface_declare< 0xa5edda1a, ... >.
|
virtual void | set_header (const char *include_name, const char *header_source)=0 |
| Stores a header in the attribute. More...
|
|
virtual const char * | get_header (const char *include_name) const =0 |
| Returns the header source code for a given name. More...
|
|
virtual mi::Uint32 | get_nb_headers () const =0 |
| Returns the total number of headers stored in the attribute. More...
|
|
virtual void | get_header (mi::Uint32 index, const char **include_name_out, const char **header_source_out) const =0 |
| Returns the name and header source code for the header with the given index. More...
|
|
virtual void | clear ()=0 |
| Removes all headers from the attributes. More...
|
|
Defines headers that can be included by rendering kernel programs.
The attribute is applied to a scene element and then affects any IRendering_kernel_program
that is also applied.
Multiple headers can be defined, each identified by the name by which it can be included in the program. While the name may look like a file path such as /includes/common/utils.h
and the header can be included as #include "/includes/common/utils.h"
, it is really just an identifier. This attribute does not perform any file access.
When multiple instances of this attribute are active for a rendered scene element, only the instance that is defined closest to the scene element in the scene description hierarchy will be used.
◆ clear()
virtual void nv::index::IRendering_kernel_program_headers::clear |
( |
| ) |
|
|
pure virtual |
Removes all headers from the attributes.
◆ get_header() [1/2]
virtual const char * nv::index::IRendering_kernel_program_headers::get_header |
( |
const char * |
include_name | ) |
const |
|
pure virtual |
Returns the header source code for a given name.
- Parameters
-
[in] | include_name | Name by which the header can be included. |
- Returns
- Header source code, or null if no header is defined for the name.
◆ get_header() [2/2]
virtual void nv::index::IRendering_kernel_program_headers::get_header |
( |
mi::Uint32 |
index, |
|
|
const char ** |
include_name_out, |
|
|
const char ** |
header_source_out |
|
) |
| const |
|
pure virtual |
Returns the name and header source code for the header with the given index.
- Parameters
-
[in] | index | Index of the header, must be less than get_nb_headers() . |
[out] | include_name_out | Will be filled with a pointer to the name of the entry, or null if the index is invalid. |
[out] | header_source_out | Will be filled with a pointer to the header source code. |
◆ get_nb_headers()
virtual mi::Uint32 nv::index::IRendering_kernel_program_headers::get_nb_headers |
( |
| ) |
const |
|
pure virtual |
Returns the total number of headers stored in the attribute.
- Returns
- Number of entries.
◆ set_header()
virtual void nv::index::IRendering_kernel_program_headers::set_header |
( |
const char * |
include_name, |
|
|
const char * |
header_source |
|
) |
| |
|
pure virtual |
Stores a header in the attribute.
Any existing header with the same name will be overwritten.
- Parameters
-
[in] | include_name | Name by which the header can be included. Must not be null or an empty string. |
[in] | header_source | Header source code. If null, any existing entry will be removed. |
The documentation for this class was generated from the following file: