Mercurial > hg > Members > kono > Cerium
diff TaskManager/Test/simple_render/viewer.cpp @ 71:475e04db46c0
*** empty log message ***
author | gongo |
---|---|
date | Mon, 18 Feb 2008 01:52:30 +0900 |
parents | 178459e03f5c |
children | 811ffebd8deb |
line wrap: on
line diff
--- a/TaskManager/Test/simple_render/viewer.cpp Mon Feb 18 01:13:00 2008 +0900 +++ b/TaskManager/Test/simple_render/viewer.cpp Mon Feb 18 01:52:30 2008 +0900 @@ -32,7 +32,7 @@ exit( 1 ); } -#if DEBUG +#ifndef DEBUG screen = SDL_SetVideoMode( width, height, bpp, SDL_HWSURFACE); if (screen == NULL) { fprintf(stderr, "Couldn't set GL mode: %s\n", SDL_GetError()); @@ -40,8 +40,7 @@ exit(1); } #else - //void *pixels; - void *_pixels = new Uint32[width*height]; + void *_pixels = new Uint32[width*height*32/8]; //posix_memalign(&pixels, width*heigh/8, DEFAULT_ALIGNMENT); screen = SDL_CreateRGBSurfaceFrom(_pixels, width, height, 32, width*4, redMask, greenMask, @@ -258,7 +257,6 @@ create_sgp(polygon, sgp); sgp_buff->swap_buffer(); - //pp = new PolygonPack; pp_buff = manager->allocate(sizeof(PolygonPack)); pixels = new Uint32[width*height]; @@ -301,9 +299,7 @@ graph_line(); fd_update_sgp = manager->open("UpdateSGP"); - //fd_update_sgp = 0; fd_create_pp = manager->open("CreatePP"); - //fd_create_pp = 1; fd = manager->open("ViewerRunDraw"); task_update_sgp = manager->create_task(fd_update_sgp, sizeof(SceneGraphPack), @@ -315,12 +311,10 @@ 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); - printf("fd = %d\n", fd); - task_update_sgp->spawn(); task_create_pp->spawn(); task->spawn();