Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Depending on the plugin type, plugin instances may correspond to different internal C++ structures.

void RixShadingPlugin::CreateInstanceData(InstanceData*)

Some shading plugin types can create private instance data using the CreateInstanceData() method. Instance data would typically be computed from the unique evocation parameters, supplied to CreateInstanceData() via the RixParameterList class. This occurs when the shading plugin instance is created for the first time from those parameters (e.g. at the time a material definition is created (i.e. very early on in a render)).

...

The other plugin types using this representation are: RixDisplacementRixLightFilterRixDisplayFilterRixSampleFilter, and RixBxdf. (with some subtleties in RixBxdf, see the closure section).

...

XXX* RixYYYPlugin()::CreateXXX()

Some other shading plugin types use a different mechanism instead of CreateInstanceData(). Generally, the RixShadingPlugin sub-class associated with the plugin type will expose a CreateXXX() method, used to build a new C++ object. In this case, the C++ object is a direct representation of the plugin instance. Generally, the render will then call methods on the newly minted C++ object, instead of using RixShadingPlugin methods and passing an instance data pointer.

...