diff Renderer/Engine/viewer.cc @ 1002:c79651141045

many changes.
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Sun, 24 Oct 2010 19:00:47 +0900
parents 0b8f9d4d7dab
children 295b3c79fb44
line wrap: on
line diff
--- a/Renderer/Engine/viewer.cc	Mon Oct 11 19:42:28 2010 +0900
+++ b/Renderer/Engine/viewer.cc	Sun Oct 24 19:00:47 2010 +0900
@@ -99,7 +99,6 @@
     sgroot = new SceneGraphRoot(this->width, this->height);
     sgroot->tmanager = manager;
 
-
     int light_num = 4;
     int size = sizeof(float)*4*light_num; //xyz+alfa(4) * light_num(4)
     int light_size = size / sizeof(float);
@@ -313,10 +312,9 @@
     dev->clean_pixels();
     pixels = dev->flip_screen(pixels);
 
-    /* ここでGameTaskの終了を待つTaskを生成しておく */
-    sgroot->wait_game_task = manager->create_task(Dummy,0,0,0,0);
     sgroot->updateControllerState();
     sgroot->allExecute(width, height);
+    sgroot->task_array_finish();
     light_xyz_stock = sgroot->getLightVector();
     light_switch_stock = sgroot->getLightSwitch();
     light_sysswitch_stock = sgroot->getLightSysSwitch();
@@ -687,13 +685,12 @@
 #else
     
     HTaskPtr task_create_pp = manager->create_task(CreatePolygonFromSceneGraph);
-    HTaskPtr game_task = sgroot->wait_game_task;
     // SceneGraph(木構造) -> PolygonPack
 
     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(game_task);
+    task_create_pp->wait_for(sgroot->game_task_array);
 
     task_next->wait_for(task_create_pp);
 
@@ -739,7 +736,6 @@
     }
 
     task_create_pp->spawn();
-    game_task->spawn();
 }
 
 
@@ -792,7 +788,7 @@
         int rangey = (starty + split_screen_h - 1 > this->height)
             ? this->height - starty + 1 : split_screen_h;
 
-#if 1
+#if 0
 
 	// mem_flag は spe 側で黒い部分を 0 で埋めるフラグ
 	if(spack->info.size > 0 || mem_flag == 1) {