An 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?");
From a procedural plugin, first call RxGetRixContext to obtain a context:
RixContext* context = RxGetRixContext(); RixMessages* msgs = (RixMessages*) context->GetRixInterface(k_RixMessages);
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: