RenderMan API  23.0
RixInterfaces API Reference

RixInterfaces are RenderMan interface extensions.A RixInterface is simply a C++ class that provides a collection of related methods. For example, the RixMessages class provides a standardized way to report errors and warnings with optional suppression of duplicate messages.

An interface is obtained by calling the GetRixInterface() method of a context with an identifier from the RixInterfaceId enum. For example, in a shader plugin:

RixMessages* msgs = (RixMessages*) rslCtx->GetRixInterface(k_RixMessages);
msgs->Warning("Are you sure about this?");

The generic interface that is returned must be cast to the appropriate type before use.

From a procedural plugin, first call RixGetContext to obtain a global context:

From a librix client, first call RixGetContext to obtain a global context.

NOTE: Not all interfaces are available from all contexts.

Interfaces should never be deleted. Most interfaces are thread safe and can be used indefinitely. For example, rather than fetching the RixMessages interface each time a warning is printed, a plugin can store the interface in a global variable and reuse it as needed.