Realtime Shader Callbacks

Each shader may implement the following callback functions:

| Init | Called the first time the shader is instantiated
| InitUI | Called when the shader connections change, or one of the specified parameters is changed
| Term | Enables the shader to clean up after itself
| GetRequirements | Sets whether any of the requirements listed in the eXSI_RTS_RequirementType enum are required or not
| GetAttributeList | Enables a shader to tell Softimage which attribute it needs in order to perform rendering
| Execute | Main entry point for rendering the realtime shader

Note:
  The Init, GetAttributeList, and Execute callbacks are mandatory.

You may prefix the name of the shader as identified in the SPDL file to the function name or any other string. For example, if the shader is named `OGL13Shade`, then you could use `OGL13Shade_Init` and `OGL13Shade_Execute`, etc. If you choose not to use a prefix, the function name must begin with an underscore (for example, `_Init`, `_Execute`, etc.).

Each entry point gets a pointer to an instance of an IRTSExecutionState object. This object gives you access to scene data such as the current Camera object. You can also use the IRTSExecutionState object to access the legacy tagXSI_RTS_SystemParams by calling IRTSExecutionState::GetSystemParams. See the IRTSExecutionState reference page for more information.

Tip:
  These functions return TRUE if successful; otherwise FALSE. All functions take the execution state object, the property page parameters, and the shader instance user data as arguments. Shader instance user data is useful if you want to pass instance data to the Term, Execute GetRequirements entry points.

Note:
  The property page parameters are passed into each callback function as a pointer to a C structure. The order of parameters matches exactly the order in which they were defined in the SPDL file with the exception of texture parameters, which always appear last in the struct.

See also:
  cus_rtshad_ExecutionFlow Execution Flow

Since:
  7.0