Wednesday, September 01, 2010

RSL shadeop plugin memory

So there are 5 ways to manage memory allocation in an RSL shadeop.

1. per plugin init - lifetime from first call to end of frame, not threadsafe, no access to args
RSLEXPORT RslFunctionTable RslPublicFunctions(myFunctions,
initStringBuffer,
deleteStringBuffer);

2. per function init - lifetime from first call to end of frame, not threadsafe, access to args
static RslFunction myFunctions[] = {
{ "string appendTx(string)", appendTx, initStringBuffer, deleteStringBuffer },
{ NULL }

3. Set / GetGlobalStorate - lifetime from first call to end of frame, not threadsafe

4. Set / GetThreadData - lifetime of thread, threadsafe

5. Set / GetLocalData - lifetime of current shaded grid, threadsafe

No comments: