comparison 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
comparison
equal deleted inserted replaced
1002:c79651141045 1003:295b3c79fb44
311 311
312 dev->clean_pixels(); 312 dev->clean_pixels();
313 pixels = dev->flip_screen(pixels); 313 pixels = dev->flip_screen(pixels);
314 314
315 sgroot->updateControllerState(); 315 sgroot->updateControllerState();
316 sgroot->allExecute(width, height); 316
317 sgroot->task_array_finish(); 317 //TaskArray を使うか使わないか
318 if (sgroot->gtask_array != NULL) {
319 sgroot->create_task_array();
320 sgroot->allExecute(width, height);
321 sgroot->task_array_finish();
322 } else {
323 sgroot->allExecute(width, height);
324 }
325
318 light_xyz_stock = sgroot->getLightVector(); 326 light_xyz_stock = sgroot->getLightVector();
319 light_switch_stock = sgroot->getLightSwitch(); 327 light_switch_stock = sgroot->getLightSwitch();
320 light_sysswitch_stock = sgroot->getLightSysSwitch(); 328 light_sysswitch_stock = sgroot->getLightSysSwitch();
321 //sgroot->checkRemove(); 329 //sgroot->checkRemove();
322 330
687 HTaskPtr task_create_pp = manager->create_task(CreatePolygonFromSceneGraph); 695 HTaskPtr task_create_pp = manager->create_task(CreatePolygonFromSceneGraph);
688 // SceneGraph(木構造) -> PolygonPack 696 // SceneGraph(木構造) -> PolygonPack
689 697
690 task_create_pp->set_param(0,(memaddr)sgroot->getDrawSceneGraph()); 698 task_create_pp->set_param(0,(memaddr)sgroot->getDrawSceneGraph());
691 task_create_pp->set_param(1,(memaddr)r[ppi].ppack); 699 task_create_pp->set_param(1,(memaddr)r[ppi].ppack);
692 /* GameTaskの終了を待ってからポリゴンを作る */ 700
693 task_create_pp->wait_for(sgroot->game_task_array); 701 /* GameTask の処理の終了を待ってからポリゴンを作る */
702 if (sgroot->gtask_array != NULL) {
703 HTaskPtr game_task_array = sgroot->gtask_array->get_task_array();
704 task_create_pp->wait_for(game_task_array);
705 }
694 706
695 task_next->wait_for(task_create_pp); 707 task_next->wait_for(task_create_pp);
696 708
697 #endif 709 #endif
698 710
786 int starty = spack->info.y_top - split_screen_h + 1; 798 int starty = spack->info.y_top - split_screen_h + 1;
787 //int endy = spack->info.y_top; 799 //int endy = spack->info.y_top;
788 int rangey = (starty + split_screen_h - 1 > this->height) 800 int rangey = (starty + split_screen_h - 1 > this->height)
789 ? this->height - starty + 1 : split_screen_h; 801 ? this->height - starty + 1 : split_screen_h;
790 802
791 #if 0 803 #if 1
792 804
793 // mem_flag は spe 側で黒い部分を 0 で埋めるフラグ 805 // mem_flag は spe 側で黒い部分を 0 で埋めるフラグ
794 if(spack->info.size > 0 || mem_flag == 1) { 806 if(spack->info.size > 0 || mem_flag == 1) {
795 807
796 int array_task_num = (this->width + split_screen_w - 1) / split_screen_w; 808 int array_task_num = (this->width + split_screen_w - 1) / split_screen_w;