#include <RslPlugin.h>
Public Member Functions | |
virtual | ~RslContext () |
Virtual destructor. | |
virtual const RslRunFlag * | GetRunFlags (unsigned int *length) const =0 |
Returns an array of runflags. | |
virtual RixInterface * | GetRixInterface (RixInterfaceId id) const =0 |
Shader plugins have access to RixInterfaces that provide various kinds of storage management (per-frame, per-thread, and per-grid), statistics reporting, error messages, etc. | |
RixStorage * | GetGlobalStorage () const |
Get thread-safe global variable storage, which is used as follows:. | |
RixStorage * | GetThreadStorage () const |
Get per-thread storage, which is used as follows:. | |
RixStorage * | GetLocalStorage () const |
Get local data storage, which is cleared when the current shader set finishes running on the current set of points. | |
void | SetThreadData (void *data, RixCleanupFunc cleanup=0L) |
Set per-thread user data and optional cleanup function. | |
void * | GetThreadData () const |
Get per-thread user data. | |
void | SetLocalData (void *data, RixCleanupFunc cleanup=0L) |
Set local user data and optional cleanup function. | |
void * | GetLocalData () const |
Get local user data. | |
virtual const char * | GetPluginName () const =0 |
Get the name of this plugin. | |
Friends | |
class | RslIter |
class | RslArrayIter |
|
Virtual destructor.
|
|
Get thread-safe global variable storage, which is used as follows:.
RixStorage* storage = rslContext->GetGlobalStorage(); storage->Lock(); void* myglobal = storage->Get("myglobal"); if (myglobal == NULL) { myglobal = MakeData(); storage->Set("myglobal", myglobal, CleanupData); } storage->Unlock();
|
|
Get local user data.
|
|
Get local data storage, which is cleared when the current shader set finishes running on the current set of points.
|
|
Get the name of this plugin.
|
|
Shader plugins have access to RixInterfaces that provide various kinds of storage management (per-frame, per-thread, and per-grid), statistics reporting, error messages, etc.
|
|
Returns an array of runflags. A value of 1 indicates the grid point is active, a value of 0 means the grid point is not active. |
|
Get per-thread user data.
|
|
Get per-thread storage, which is used as follows:.
RixStorage* storage = rslContext->GetThreadStorage(); void* mydata = storage->Get("mydata"); if (mydata == NULL) { mydata = MakeData(); storage->Set("mydata", mydata, CleanupData); }
|
|
Set local user data and optional cleanup function. The cleanup function is called on the user data when the current shader set finishes running on the current set of points. For greater flexibility, use GetLocals. |
|
Set per-thread user data and optional cleanup function. The cleanup function is called on the user data when the thread is terminated. For greater flexibility, use GetThreadLocals. |