Mercurial > hg > Game > Cerium
changeset 826:d98371202f1d draft
RenderingEngine's Task -> Simple Task
author | Yutaka_Kinjyo |
---|---|
date | Tue, 25 May 2010 03:06:02 +0900 |
parents | b1cda71d31b5 |
children | 5ffe41af8d3b |
files | Renderer/Engine/viewer.cc Renderer/Test/viewer.cc |
diffstat | 2 files changed, 17 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/Renderer/Engine/viewer.cc Mon May 24 23:53:06 2010 +0900 +++ b/Renderer/Engine/viewer.cc Tue May 25 03:06:02 2010 +0900 @@ -117,6 +117,7 @@ } for(int i = 0; i < spe_num; i++) { + HTaskPtr data_load = manager->create_task(DataLoad); data_load->set_param(0,(memaddr)size); data_load->set_param(1,(memaddr)Light); @@ -196,13 +197,13 @@ spackList[i-1].init(i*split_screen_h); } - task_next = manager->create_task(Dummy); + task_next = manager->create_task(Dummy,0,0,0,0); // ここは、Iterator を用意するべきだよね for (int i = 0; i < spe_num; i++) { - task_tex = manager->create_task(LoadTexture); - task_tex->set_cpu((CPU_TYPE)((int)SPE_0 + i)); - task_next->wait_for(task_tex); + task_tex = manager->create_task(LoadTexture,0,0,0,0); + task_tex->set_cpu((CPU_TYPE)((int)SPE_0 + i)); + task_next->wait_for(task_tex); task_tex->spawn(); } @@ -266,23 +267,24 @@ //send_key_task->set_param((int)sgroot); // set input data -> viewer keyPtr viewer->getKey(); - HTaskPtr update_key = viewer->manager->create_task(UpdateKey); + //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); + 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); - HTaskPtr draw_dummy = viewer->manager->create_task(Dummy); + 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); + 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); @@ -347,7 +349,7 @@ post2rendering(SchedTask *s, void *viewer_, void *arg) { Viewer *viewer = (Viewer *)viewer_; - HTaskPtr task_next = viewer->manager->create_task(Dummy); + HTaskPtr task_next = viewer->manager->create_task(Dummy,0,0,0,0); viewer->rendering(task_next); } @@ -368,7 +370,7 @@ post2runLoop(SchedTask *s, void *viewer_, void *arg) { Viewer *viewer = (Viewer*)viewer_; - HTaskPtr task_next = viewer->manager->create_task(Dummy); + HTaskPtr task_next = viewer->manager->create_task(Dummy,0,0,0,0); viewer->run_loop(task_next); psx_sync_n(); @@ -378,7 +380,7 @@ post2runDraw(SchedTask *s, void *viewer_, void *arg) { Viewer *viewer = (Viewer*)viewer_; - HTaskPtr task_next = viewer->manager->create_task(Dummy); + HTaskPtr task_next = viewer->manager->create_task(Dummy,0,0,0,0); viewer->run_draw(task_next); } @@ -400,7 +402,7 @@ post2speRendering(SchedTask *s, void *viewer_, void *arg) { Viewer *viewer = (Viewer*)viewer_; - HTaskPtr task_next = viewer->manager->create_task(Dummy); + HTaskPtr task_next = viewer->manager->create_task(Dummy,0,0,0,0); viewer->spe_rendering(task_next); } @@ -419,7 +421,7 @@ post2speDraw(SchedTask *s, void *viewer_, void *arg) { Viewer *viewer = (Viewer*)viewer_; - HTaskPtr task_next = viewer->manager->create_task(Dummy); + HTaskPtr task_next = viewer->manager->create_task(Dummy,0,0,0,0); viewer->spe_draw(task_next); }
--- a/Renderer/Test/viewer.cc Mon May 24 23:53:06 2010 +0900 +++ b/Renderer/Test/viewer.cc Tue May 25 03:06:02 2010 +0900 @@ -12,7 +12,7 @@ static void object_move_translation(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h); -char *light_sysswitch = NULL; +char *light_sysswitch = on; int light_num = 4; void LightSysSwitch(Viewer *sgroot) {