diff options
| author | 2009-08-13 14:18:52 -0700 | |
|---|---|---|
| committer | 2009-08-13 14:18:52 -0700 | |
| commit | 1e16e4018c619aa4fcadbe3c97a4b47e90969d1c (patch) | |
| tree | a485c83564aefbcced6cb66262d0016c8c418949 /libs/rs/rsScript.cpp | |
| parent | f71db95992dab3ea1c5b22baa9772761282ee287 (diff) | |
| parent | fbf0b9ecda03fbdbd4ebabfd18da09a789686249 (diff) | |
Merge change 21152
* changes:
Implement named slots and convert script.addType to script.setType to remove ordering restrictions.
Diffstat (limited to 'libs/rs/rsScript.cpp')
| -rw-r--r-- | libs/rs/rsScript.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/libs/rs/rsScript.cpp b/libs/rs/rsScript.cpp index 6ce9f61f1c24..75c994b24fd0 100644 --- a/libs/rs/rsScript.cpp +++ b/libs/rs/rsScript.cpp @@ -76,6 +76,25 @@ void rsi_ScriptSetClearStencil(Context * rsc, RsScript vs, uint32_t v) s->mEnviroment.mClearStencil = v; } +void rsi_ScriptSetType(Context * rsc, RsType vt, uint32_t slot, const char *name) +{ + ScriptCState *ss = &rsc->mScriptC; + const Type *t = static_cast<const Type *>(vt); + ss->mConstantBufferTypes[slot].set(t); + if (name) { + ss->mSlotNames[slot].setTo(name); + } else { + ss->mSlotNames[slot].setTo(""); + } +} + +void rsi_ScriptSetRoot(Context * rsc, bool isRoot) +{ + ScriptCState *ss = &rsc->mScriptC; + ss->mEnviroment.mIsRoot = isRoot; +} + + } } |