Add multitouch support to physics test.
Fix context state overwrite calling invoke.

Change-Id: I7a71237bcf36abb31f98eb6d872501fdfb007d81
diff --git a/rsScriptC.cpp b/rsScriptC.cpp
index d4edafd..b3dbf11 100644
--- a/rsScriptC.cpp
+++ b/rsScriptC.cpp
@@ -47,7 +47,6 @@
 }
 
 void ScriptC::setupScript(Context *rsc) {
-    setupGLState(rsc);
     mEnviroment.mStartTimeMillis
                 = nanoseconds_to_milliseconds(systemTime(SYSTEM_TIME_MONOTONIC));
 
@@ -123,6 +122,7 @@
         return 0;
     }
 
+    setupGLState(rsc);
     setupScript(rsc);
 
     uint32_t ret = 0;
@@ -278,6 +278,7 @@
 
     rsAssert(ain->getType()->getDimZ() == 0);
 
+    setupGLState(rsc);
     setupScript(rsc);
     Script * oldTLS = setTLS(this);
 
@@ -336,7 +337,6 @@
 }
 
 void ScriptC::Invoke(Context *rsc, uint32_t slot, const void *data, uint32_t len) {
-    //LOGE("rsi_ScriptInvoke %i", slot);
     if ((slot >= mEnviroment.mInvokeFunctionCount) ||
         (mEnviroment.mInvokeFunctions[slot] == NULL)) {
         rsc->setError(RS_ERROR_BAD_SCRIPT, "Calling invoke on bad script");