What did the extra set shader commands do to the speed?
Separate question - if you have Dispatch Update and Render scripts and you want to terminate them without using Sphere.exit() how do you do it? (I tried setting variables to store their tokens then using Dispatch.cancel(token)
var tokens =[];
tokens[0] = Dispatch.onRender(drawing);
tokens[1] = Dispatch.onUpdate(updating);
//then within the function "updating" on meeting a ertain condition
Dispatch.cancel(tokens[0]);
Dispatch.cancel(tokens[1]);
But I got a hard crash:
Application Specific Information:
abort() called
*** error for object 0x7fefd985d5d0: pointer being freed was not allocated
Thread 4 Crashed:
0 libsystem_kernel.dylib 0x00007fffac2d9d42 __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fffac3c7457 pthread_kill + 90
2 libsystem_c.dylib 0x00007fffac23f420 abort + 129
3 libsystem_malloc.dylib 0x00007fffac32efe7 free + 530
4 sphereRun 0x000000010ab2911c async_cancel + 206 (async.c:67)
5 sphereRun 0x000000010ab3ceb7 js_Dispatch_cancel + 26 (pegasus.c:1429)
6 sphereRun 0x000000010ab1c8bf duk__handle_call_inner + 675 (duk_js_call.c:1617)
7 sphereRun 0x000000010ab1e3c1 duk__js_execute_bytecode_inner + 2373 (duk_js_executor.c:4533)
8 sphereRun 0x000000010ab1d672 duk_js_execute_bytecode + 150 (duk_js_executor.c:2404)
9 sphereRun 0x000000010ab1c988 duk__handle_call_inner + 876 (duk_js_call.c:1573)
10 sphereRun 0x000000010ab48685 script_run + 129 (script.c:177)
11 sphereRun 0x000000010ab2930f async_run_jobs + 105 (async.c:125)
12 sphereRun 0x000000010ab480db screen_flip + 1549 (screen.c:383)
13 sphereRun 0x000000010ab41d31 duk_safe_event_loop + 55 (pegasus.c:900)
14 sphereRun 0x000000010aae9add duk_handle_safe_call + 610 (duk_js_call.c:2145)
15 sphereRun 0x000000010aae7fb8 dukrub_safe_call + 34 (duk_rubber.c:64)
16 sphereRun 0x000000010ab41ce5 pegasus_run + 38 (pegasus.c:696)
17 sphereRun 0x000000010ab3276a _al_mangled_main + 3177 (main.c:280)
18 sphereRun 0x000000010ab7db7a +[AllegroAppDelegate app_main:] + 23
19 com.apple.Foundation 0x00007fff98454b3d __NSThread__start__ + 1243
20 libsystem_pthread.dylib 0x00007fffac3c493b _pthread_body + 180
21 libsystem_pthread.dylib 0x00007fffac3c4887 _pthread_start + 286
22 libsystem_pthread.dylib 0x00007fffac3c408d thread_start + 13