Mercurial > hg > Members > kono > Cerium
diff TaskManager/Test/simple_render/viewer.cpp @ 85:9b96b190cb73
*** empty log message ***
author | gongo |
---|---|
date | Wed, 27 Feb 2008 04:25:04 +0900 |
parents | b03a4d3565c0 |
children | 61bacd3b4405 |
line wrap: on
line diff
--- a/TaskManager/Test/simple_render/viewer.cpp Tue Feb 26 21:49:50 2008 +0900 +++ b/TaskManager/Test/simple_render/viewer.cpp Wed Feb 27 04:25:04 2008 +0900 @@ -30,7 +30,7 @@ exit( 1 ); } -#ifndef _DEBUG +#ifdef _DEBUG screen = SDL_SetVideoMode( width, height, bpp, SDL_HWSURFACE); if (screen == NULL) { fprintf(stderr, "Couldn't set GL mode: %s\n", SDL_GetError()); @@ -211,8 +211,8 @@ } } -// run_arg_t ¤Ë½ñ¤¯¤Î¤¬¤á¤ó¤É¤¤¤«¤é¤Ã¤Æ -// global ¤Ë½ñ¤¯¤Î¤â¤É¤¦¤« +// run_arg_t ’¤Ë’½ñ’¤¯’¤Î’¤¬’¤á’¤ó’¤É’¤¤’¤«’¤é’¤Ã’¤Æ +// global ’¤Ë’½ñ’¤¯’¤Î’¤â’¤É’¤¦’¤« int start_time; int this_time; int frames; @@ -224,10 +224,8 @@ //PolygonPack *pp; DmaBuffer *sgp_buff; DmaBuffer *pp_buff; -DmaBuffer *spl_buff; DmaBuffer *sp_buff; DmaBuffer *ssl_buff; -DmaBuffer *splssl_buff; void @@ -237,8 +235,6 @@ int fd; SceneGraphPack *sgp; - SPANPACKLIST *spl; - SPLSSL *splssl; start_time = get_ticks(); this_time = 0; @@ -251,28 +247,13 @@ polygon->viewer = this; #if 1 - // ÄÌ¿®ÍÑ buffer ¤Î allocate - // ¤³¤ì¤¸¤ã¤Ê¤¤¤ÈÄÌ¿®ÍѤ˻Ȥ¨¤Ê¤¤(¤è¤¦¤Ë½èÍý¤ò½ñ¤«¤Ê¤¤¤È¡ª) sgp_buff = manager->allocate(sizeof(SceneGraphPack)); - - pp_buff = manager->allocate(sizeof(PolygonPack)); - + pp_buff = manager->allocate(sizeof(PolygonPack)); sp_buff = manager->allocate(sizeof(SPANPACK)); - spl_buff = manager->allocate(sizeof(SPANPACKLIST)); - - spl_buff->get_buffer(&spl); - spl->size = 60; - spl_buff->swap_buffer(); - spl_buff->get_buffer(&spl); - spl->size = 60; - spl_buff->swap_buffer(); ssl_buff = manager->allocate(sizeof(SPUSPANLIST)); - splssl_buff = manager->allocate(sizeof(SPLSSL)); sgp_buff->get_buffer(&sgp); - //spl_buff->get_buffer(&spl); - create_sgp(polygon, sgp); sgp_buff->swap_buffer(); @@ -280,9 +261,6 @@ create_sgp(polygon, sgp); sgp_buff->swap_buffer(); - - - #else //sgp = new SceneGraphPack; posix_memalign((void**)&sgp, DEFAULT_ALIGNMENT, sizeof(SceneGraphPack)); @@ -353,17 +331,30 @@ sgp_buff, pp_buff, NULL); #if 0 task_create_sp - = manager->create_task(fd_update_sgp, sizeof(SceneGraphPack), - sgp_buff, sgp_buff, NULL); - task_spu_sp + = manager->create_task(fd_create_sp, sizeof(SceneGraphPack), + pp_buff, spl_buff, NULL); + task_load_texture + = manager->create_task + task_spu_span = manager->create_task(fd_create_pp, sizeof(SceneGraphPack), sgp_buff, pp_buff, NULL); + + task_draw_finish = manager->create(); + for (int i = 0; i < draw_spe_num; i++) { + task_spu_draw[i] + = manager->create_task(fd_create_pp, sizeof(SceneGraphPack), + spuspan_buff, pp_buff, NULL); + task_spu_draw[i]->set_depend(task_spu_span); + task_draw_finish->set_depend(tas_spu_draw[i]); + } + #endif task = manager->create_task(fd, 0, 0, 0, NULL); task->set_depend(task_update_sgp); task->set_depend(task_create_pp); - + + //task_update_sgp->set_cpu(CPU_SPE); task_create_pp->set_cpu(CPU_SPE); @@ -395,6 +386,17 @@ task->spawn(); } +#if 0 +void +Viewer::draw_finish(void) +{ + // + + HTaskPtr task = manager->create(task_r); + +} +#endif + void Viewer::run_finish(void) {