changeset 1095:652791a4a324 draft

remove spe function
author yutaka@localhost.localdomain
date Sat, 25 Dec 2010 18:30:17 +0900
parents f10ec9bbd3f6
children d18b605e431f
files Renderer/Engine/viewer.cc Renderer/Engine/viewer.h
diffstat 2 files changed, 0 insertions(+), 86 deletions(-) [+]
line wrap: on
line diff
--- a/Renderer/Engine/viewer.cc	Sat Dec 25 18:38:53 2010 +0900
+++ b/Renderer/Engine/viewer.cc	Sat Dec 25 18:30:17 2010 +0900
@@ -15,8 +15,6 @@
 
 static void post2runLoop(SchedTask *s,void *viewer,void *s1);
 static void post2runDraw(SchedTask *s,void *viewer,void *s1);
-static void post2speRendering(SchedTask *s,void *viewer,void *s1);
-static void post2speDraw(SchedTask *s,void *viewer,void *s1);
 static void post2runMoveDrawLoop(SchedTask *s,void *viewer,void *s1);
 
 /* measure for FPS (Frame Per Second) */
@@ -246,47 +244,6 @@
     }
 }
 
-static void
-post2runMoveDrawLoop(SchedTask *m, void *viewer_, void *arg)
-{
-    Viewer *viewer = (Viewer*)viewer_;
-    
-    // 同じ PPE 上なので sgroot(ポインタ) を set_param で送る。 
-    //HTaskPtr send_key_task = viewer->manager->create_task(SendKey);
-    //send_key_task->set_param((int)sgroot);
-    // set input data -> viewer keyPtr
-    viewer->getKey();
-    //HTaskPtr update_key = viewer->manager->create_task(UpdateKey,viewer->keyPtr, sizeof(key_stat),0,0);
-    HTaskPtr update_key = viewer->manager->create_task(UpdateKey,0,0,0,0);
-    update_key->add_inData(viewer->keyPtr, sizeof(key_stat));
-    //update_key->set_cpu(SPE_0);
-    update_key->spawn();
-    
-    /* TASK_MOVE は外から引数で取ってくるべき */
-    //HTaskPtr move_task = viewer->manager->create_task(viewer->app->move_taskid);    
-    // HTaskPtr move_task = viewer->manager->create_task(Move,0,0,0,0);
-    //move_task->set_param(sgroot);
-
-    //HTaskPtr draw_task = viewer->manager->create_task(Draw);
-
-    /* rendering task test */
-    HTaskPtr draw_task = viewer->manager->create_task(Dummy,0,0,0,0);
-    HTaskPtr draw_dummy = viewer->manager->create_task(Dummy,0,0,0,0);
-
-    HTaskPtr switch_task = viewer->manager->create_task(Switch,0,0,0,0);
-    viewer->draw_dummy = draw_dummy;
-    switch_task->wait_for(draw_dummy);
-    draw_task->set_post(post2speRendering, (void*)viewer, 0);
-
-    // switch_task->wait_for(move_task);
-    switch_task->wait_for(draw_task);
-    // move_task->spawn();
-    draw_task->spawn();
-
-    switch_task->set_post(post2runMoveDrawLoop, (void*)viewer, 0);
-    switch_task->spawn();
-    
-}
 
 void
 Viewer::mainLoop()
@@ -396,47 +353,6 @@
 }
 
 
-static void
-post2speRendering(SchedTask *s, void *viewer_, void *arg)
-{
-    Viewer *viewer = (Viewer*)viewer_;
-    HTaskPtr task_next = viewer->manager->create_task(Dummy,0,0,0,0);
-    viewer->spe_rendering(task_next);
-}
-
-void 
-Viewer::spe_rendering(HTaskPtr task_next)
-{
-    common_rendering(task_next, sgroot);
-
-    this->draw_dummy->wait_for(task_next);
-    task_next->set_post(post2speDraw, (void*)this, 0);
-    task_next->spawn();
-
-}
-
-static void 
-post2speDraw(SchedTask *s, void *viewer_, void *arg)
-{
-    Viewer *viewer = (Viewer*)viewer_;
-    HTaskPtr task_next = viewer->manager->create_task(Dummy,0,0,0,0);
-    viewer->spe_draw(task_next);
-}
-
-void
-Viewer::spe_draw(HTaskPtr task_next)
-{
-    common_draw(task_next);
-    
-    this->draw_dummy->wait_for(task_next);
-    task_next->spawn();
-    this->draw_dummy->spawn();
-
-    frames++;
-}
-
-
-
 void
 coord_allocate(int &cur_point, float *coord_pack, int spe_num,
 	       int alloc_size, HTaskPtr alloc_wait, TaskManager *manager)
--- a/Renderer/Engine/viewer.h	Sat Dec 25 18:38:53 2010 +0900
+++ b/Renderer/Engine/viewer.h	Sat Dec 25 18:30:17 2010 +0900
@@ -109,8 +109,6 @@
     void common_draw(HTaskPtr task_next);
     void common_rendering(HTaskPtr task_next, SceneGraphRoot *sgroot);
 
-    void spe_rendering(HTaskPtr task_next);
-    void spe_draw(HTaskPtr task_next);
     //  void exchange_sgroot(TaskManager *manager);
 
     HTaskPtr update_task_create(void *data, int size,