Mercurial > hg > Members > kono > Cerium
changeset 71:475e04db46c0
*** empty log message ***
author | gongo |
---|---|
date | Mon, 18 Feb 2008 01:52:30 +0900 |
parents | 178459e03f5c |
children | cf36120bc158 |
files | TaskManager/Test/simple_render/Makefile TaskManager/Test/simple_render/main.cpp TaskManager/Test/simple_render/viewer.cpp |
diffstat | 3 files changed, 6 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/Test/simple_render/Makefile Mon Feb 18 01:13:00 2008 +0900 +++ b/TaskManager/Test/simple_render/Makefile Mon Feb 18 01:52:30 2008 +0900 @@ -13,9 +13,9 @@ EXTRA_CFLAGS = `sdl-config --cflags` `xml2-config --cflags`\ -LIBS = `sdl-config --libs` -lSDL_image -lGL \ +LIBS = `sdl-config --libs` -lSDL_image -Wl,-framework,OpenGL \ `xml2-config --libs`\ - -L../../ -lmanager -lspe2 -lpthread + -L../../ -lmanager# -lspe2 -lpthread .SUFFIXES: .cpp .o
--- a/TaskManager/Test/simple_render/main.cpp Mon Feb 18 01:13:00 2008 +0900 +++ b/TaskManager/Test/simple_render/main.cpp Mon Feb 18 01:52:30 2008 +0900 @@ -96,7 +96,7 @@ int run_finish(void *r, void *w) { __debug("[%s]\n", __FUNCTION__); - screen->run_finish(); + //screen->run_finish(); return 0; }
--- 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();