Mercurial > hg > Game > Cerium
diff Renderer/Engine/SgChange.cc @ 758:77f936380930 draft
fix create_task
author | hiroki@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Mon, 01 Feb 2010 17:08:36 +0900 |
parents | 1666dba6f6d9 |
children | 45f7ab7101ea |
line wrap: on
line diff
--- a/Renderer/Engine/SgChange.cc Sat Jan 30 19:33:16 2010 +0900 +++ b/Renderer/Engine/SgChange.cc Mon Feb 01 17:08:36 2010 +0900 @@ -17,7 +17,6 @@ static void post2runLoop(SchedTask *s, void *viewer, void *s1); static void post2run(SchedTask *s, void *viewer, void *s1); static void post2runDraw(SchedTask *s, void *viewer, void *s1); -static void post2runMove(SchedTask *s, void *viewer, void *s1); static void post2rendering(SchedTask *s, void *viewer, void *s1); /* measure for FPS (Frame Per Second) */ @@ -85,12 +84,6 @@ void SgChange::pass_draw_tree() { - /* - SceneGraphRoot *tmp; - tmp = sgroot_A; - sgroot_A = sgroot_B; - sgroot_B = tmp; - */ sgroot_B->sg_draw_tree = sgroot_A->sg_exec_tree; } @@ -125,15 +118,10 @@ HTaskPtr draw_task = manager->create_task(Dummy); draw_task->set_post(post2rendering, (void *)this, 0); -#if 0 - HTaskPtr move_task = manager->create_task(Dummy); - move_task->set_post(post2runMove, (void *)this, 0); -#else HTaskPtr move_task = manager->create_task(RunMove); move_task->set_param(0, (memaddr)this); move_task->set_param(1, viewer->width); move_task->set_param(2, viewer->height); -#endif HTaskPtr dummy_task = manager->create_task(Dummy); @@ -143,27 +131,12 @@ loop_task->wait_for(move_task); draw_task->spawn(); + // この時点で app の task_id を知っていないとダメか move_task->spawn(); loop_task->spawn(); } static void -post2runMove(SchedTask *s, void *viewer_, void *arg) -{ - SgChange *viewer = (SgChange *)viewer_; - HTaskPtr task_next = viewer->manager->create_task(Dummy); - viewer->run_move(task_next); -} - -void -SgChange::run_move(HTaskPtr task_next) -{ - sgroot_A->updateControllerState(); - sgroot_A->allExecute(viewer->width, viewer->height); - viewer->light_xyz_stock = sgroot_A->getLightVector(); -} - -static void post2rendering(SchedTask *s, void *sgchange_, void *arg) { SgChange *sgchange = (SgChange *)sgchange_;