diff options
author | Jason Sams <rjsams@android.com> | 2009-08-13 12:59:04 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2009-08-13 12:59:04 -0700 |
commit | fa51719e6c1bd17b3f347477b4827face9ab647e (patch) | |
tree | 1a07e64dd0ce240b0f948f3df55877d7a998e2b6 /rsScript.cpp | |
parent | 8b2c065dfc16c148e2829a19e83d2269b9bcd4cc (diff) | |
download | rs-fa51719e6c1bd17b3f347477b4827face9ab647e.tar.gz |
Implement named slots and convert script.addType to script.setType to remove ordering restrictions.
Diffstat (limited to 'rsScript.cpp')
-rw-r--r-- | rsScript.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/rsScript.cpp b/rsScript.cpp index 6ce9f61f..75c994b2 100644 --- a/rsScript.cpp +++ b/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; +} + + } } |