From be2e84193f709419634de4cc3ba0e67acf6976f3 Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Wed, 16 Sep 2009 15:04:38 -0700 Subject: Implement renderscript Invokables. --- libs/rs/rsScript.cpp | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'libs/rs/rsScript.cpp') diff --git a/libs/rs/rsScript.cpp b/libs/rs/rsScript.cpp index fde31a1b90cc..99a085d87856 100644 --- a/libs/rs/rsScript.cpp +++ b/libs/rs/rsScript.cpp @@ -27,6 +27,8 @@ Script::Script() mEnviroment.mClearColor[2] = 0; mEnviroment.mClearColor[3] = 1; mEnviroment.mClearDepth = 1; + mEnviroment.mClearStencil = 0; + mEnviroment.mIsRoot = false; } Script::~Script() @@ -83,10 +85,23 @@ void rsi_ScriptSetType(Context * rsc, RsType vt, uint32_t slot, bool writable, c } } +void rsi_ScriptSetInvoke(Context *rsc, const char *name, uint32_t slot) +{ + ScriptCState *ss = &rsc->mScriptC; + ss->mInvokableNames[slot] = name; +} + +void rsi_ScriptInvoke(Context *rsc, RsScript vs, uint32_t slot) +{ + Script *s = static_cast