RenderMan API  22.7
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.

Not all interfaces are available from all contexts. For example, the global RixContext currently does not have access to RixLocalData.

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. Some interfaces are transient, however: in particular, an RixStorage interface for per-thread or local data can be used only in the context from which it was obtained.

For more information, browse the documentation for these classes: