Mercurial > hg > Members > kono > Cerium
diff Renderer/Engine/viewer.cc @ 1033:431936c0cc96
add application main method and task.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 26 Nov 2010 04:32:59 +0900 |
parents | 67ff44a08090 |
children | a0faa0cfc271 |
line wrap: on
line diff
--- a/Renderer/Engine/viewer.cc Thu Oct 28 17:40:13 2010 +0900 +++ b/Renderer/Engine/viewer.cc Fri Nov 26 04:32:59 2010 +0900 @@ -142,6 +142,7 @@ this_time = 0; frames = 0; + this->app = app; MainLoop *mainloop = app->init(this, this->width, this->height); mainloop->mainLoop(); } @@ -292,6 +293,7 @@ { HTaskPtr task_next = initLoop(); + task_next = app->application_task(task_next, this); task_next->set_post(&post2runLoop, (void *)this, (void*)pixels); // set_post(function(this->run_loop()), NULL) task_next->spawn(); } @@ -312,8 +314,8 @@ dev->clean_pixels(); pixels = dev->flip_screen(pixels); - sgroot->updateControllerState(); + app->app_main(this); //TaskArray を使うか使わないか if (sgroot->gtask_array != NULL) {