Mercurial > hg > Members > kono > Cerium
diff Renderer/Engine/viewer.cc @ 1003:295b3c79fb44
game_task keep up with task_array.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 26 Oct 2010 17:29:50 +0900 |
parents | c79651141045 |
children | 67ff44a08090 |
line wrap: on
line diff
--- a/Renderer/Engine/viewer.cc Sun Oct 24 19:00:47 2010 +0900 +++ b/Renderer/Engine/viewer.cc Tue Oct 26 17:29:50 2010 +0900 @@ -313,8 +313,16 @@ pixels = dev->flip_screen(pixels); sgroot->updateControllerState(); - sgroot->allExecute(width, height); - sgroot->task_array_finish(); + + //TaskArray を使うか使わないか + if (sgroot->gtask_array != NULL) { + sgroot->create_task_array(); + sgroot->allExecute(width, height); + sgroot->task_array_finish(); + } else { + sgroot->allExecute(width, height); + } + light_xyz_stock = sgroot->getLightVector(); light_switch_stock = sgroot->getLightSwitch(); light_sysswitch_stock = sgroot->getLightSysSwitch(); @@ -689,8 +697,12 @@ task_create_pp->set_param(0,(memaddr)sgroot->getDrawSceneGraph()); task_create_pp->set_param(1,(memaddr)r[ppi].ppack); - /* GameTaskの終了を待ってからポリゴンを作る */ - task_create_pp->wait_for(sgroot->game_task_array); + + /* GameTask の処理の終了を待ってからポリゴンを作る */ + if (sgroot->gtask_array != NULL) { + HTaskPtr game_task_array = sgroot->gtask_array->get_task_array(); + task_create_pp->wait_for(game_task_array); + } task_next->wait_for(task_create_pp); @@ -788,7 +800,7 @@ int rangey = (starty + split_screen_h - 1 > this->height) ? this->height - starty + 1 : split_screen_h; -#if 0 +#if 1 // mem_flag は spe 側で黒い部分を 0 で埋めるフラグ if(spack->info.size > 0 || mem_flag == 1) {