Mercurial > hg > Members > kono > Cerium
changeset 99:57bac9e07662
rotate cube only polygon
author | gongo |
---|---|
date | Fri, 29 Feb 2008 05:20:23 +0900 |
parents | f320d1039d51 |
children | 9f8b53beef7e |
files | TaskManager/Test/simple_render/Makefile TaskManager/Test/simple_render/polygon.cpp TaskManager/Test/simple_render/spe/Makefile TaskManager/Test/simple_render/spe/SpuDraw.cpp TaskManager/Test/simple_render/spe/SpuDraw.h TaskManager/Test/simple_render/spe/spe-main.cpp TaskManager/Test/simple_render/task/create_span.cpp TaskManager/Test/simple_render/test/LoadTexture/spe/Load_Texture.cpp TaskManager/Test/simple_render/viewer.cpp |
diffstat | 9 files changed, 198 insertions(+), 275 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/Test/simple_render/Makefile Thu Feb 28 21:45:13 2008 +0900 +++ b/TaskManager/Test/simple_render/Makefile Fri Feb 29 05:20:23 2008 +0900 @@ -11,12 +11,12 @@ CFLAGS = -g -O9 -Wall -DDEBUG INCLUDE = -I../../../include/TaskManager -I. -EXTRA_CFLAGS = `sdl-config --cflags` `xml2-config --cflags`\ +EXTRA_CFLAGS = `sdl-config --cflags` `xml2-config --cflags` -I/usr/local/include/SDL EXTRA_LIBS = -lCellManager -lspe2 -lpthread #EXTRA_LIBS = -lFifoManager -LIBS = `sdl-config --libs` -lSDL_image -lGL \ +LIBS = `sdl-config --libs` /usr/local/lib/libSDL_image.a -lGL \ `xml2-config --libs` -L../.. $(EXTRA_LIBS) #LIBS = `sdl-config --libs` -lSDL_image -Wl,-framework,OpenGL \ # `xml2-config --libs` -L../.. $(EXTRA_LIBS)
--- a/TaskManager/Test/simple_render/polygon.cpp Thu Feb 28 21:45:13 2008 +0900 +++ b/TaskManager/Test/simple_render/polygon.cpp Fri Feb 29 05:20:23 2008 +0900 @@ -356,6 +356,8 @@ { SPAN_PTR span; + printf("%d\n", sp->info.size); + printf("%d\n", sp->span[0].y); for (int n = 0; n < sp->info.size; n++) { span = &sp->span[n];
--- a/TaskManager/Test/simple_render/spe/Makefile Thu Feb 28 21:45:13 2008 +0900 +++ b/TaskManager/Test/simple_render/spe/Makefile Fri Feb 29 05:20:23 2008 +0900 @@ -4,7 +4,7 @@ OBJS = $(SRCS:.cpp=.o) CC = spu-g++ -CFLAGS = -O9 -Os -g -Wall -DDEBUG +CFLAGS = -g -Wall -DDEBUG INCLUDE = -I../../../../include/TaskManager -I. -I.. LIBS = -L../../.. -lspemanager# -lm
--- a/TaskManager/Test/simple_render/spe/SpuDraw.cpp Thu Feb 28 21:45:13 2008 +0900 +++ b/TaskManager/Test/simple_render/spe/SpuDraw.cpp Fri Feb 29 05:20:23 2008 +0900 @@ -1,3 +1,4 @@ +#include <malloc.h> #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -7,207 +8,169 @@ #include "span_pack.h" #include "spu_span.h" #include "error.h" +#include "CellScheduler.h" #define PIXELSIZE 11520 //32 line pixel size SpuDraw::~SpuDraw(void) { - free(*zRow); - free(zRow); - - free(*linebuf); - free(linebuf); + free(zRow); + free(linebuf); } void SpuDraw::linebuf_init() { - // memset, memzero ? とか - // DMAで取ってくるって手もある - int x = 8; - int y = IMG_MAX_Y; - - linebuf = (int**)malloc(sizeof(int*)*x); - int *linebuf_head = (int*)malloc(sizeof(int)*x*y); + int y = 8; + int x = IMG_MAX_X; - for (int i = 0; i < x; i++) { - linebuf[i] = linebuf_head + i*y; - } - -#if 0 - for (int t = 0; t < 8; t++) { - for (int i = 0; i < IMG_MAX_Y; i++) { - linebuf[t][i] = 0; - } - } -#else - bzero(linebuf_head, sizeof(int)*x*y); - //memset(linebuf_head, 0, sizeof(float)*x*y); -#endif + linebuf = (int*)memalign(DEFAULT_ALIGNMENT, sizeof(int)*x*y); + memset(linebuf, 0, sizeof(int)*x*y); } void SpuDraw::zRow_init(void) { - int x = 8; - int y = IMG_MAX_Y; - - zRow = (float**)malloc(sizeof(float*)*x); - float *zRow_head = (float*)malloc(sizeof(float)*x*y); - - for (int i = 0; i < x; i++) { - zRow[i] = zRow_head + i*y; - } + int y = 8; + int x = IMG_MAX_X; + float z = 65535; -#if 0 - for (int t = 0; t < 8; t++) { - for (int i = 0; i < IMG_MAX_Y; i++) { - zRow[t][i] = 65535; - } - } -#else - // memset や bzero でもいいし、 - // DMAで取ってくるって手もある - memset(zRow_head, 0xffff, sizeof(float)*x*y); -#endif + zRow = (float*)malloc(sizeof(float)*x*y); + memset(zRow, *(int*)&z, sizeof(float)*x*y); } char* SpuDraw::get_pixel(int tx, int ty, void *texture_image) { - //return (char*)texture_image->pixels+(texture_image->format->BytesPerPixel*((texture_image->w)*ty+tx)); - return (char*)texture_image+(3*((128)*ty+tx)); + //return (char*)texture_image->pixels+(texture_image->format->BytesPerPixel*((texture_image->w)*ty+tx)); + return (char*)texture_image+(3*((128)*ty+tx)); } Uint32 SpuDraw::SDL_MapRGB(SDL_PixelFormat *format, Uint8 r, Uint8 g, Uint8 b) { - if ( format->palette == NULL ) { - return (r >> format->Rloss) << format->Rshift - | (g >> format->Gloss) << format->Gshift - | (b >> format->Bloss) << format->Bshift - | format->Amask; - } else { - return SDL_FindColor(format->palette, r, g, b); - } + if ( format->palette == NULL ) { + return (r >> format->Rloss) << format->Rshift + | (g >> format->Gloss) << format->Gshift + | (b >> format->Bloss) << format->Bshift + | format->Amask; + } else { + return SDL_FindColor(format->palette, r, g, b); + } } Uint8 SpuDraw::SDL_FindColor(SDL_Palette *pal, Uint8 r, Uint8 g, Uint8 b) { - /* Do colorspace distance matching */ - unsigned int smallest; - unsigned int distance; - int rd, gd, bd; - int i; - Uint8 pixel=0; + /* Do colorspace distance matching */ + unsigned int smallest; + unsigned int distance; + int rd, gd, bd; + int i; + Uint8 pixel=0; - smallest = ~0; - for ( i=0; i<pal->ncolors; ++i ) { - rd = pal->colors[i].r - r; - gd = pal->colors[i].g - g; - bd = pal->colors[i].b - b; - distance = (rd*rd)+(gd*gd)+(bd*bd); - if ( distance < smallest ) { - pixel = i; - if ( distance == 0 ) { /* Perfect match! */ - break; - } - smallest = distance; - } - } - return(pixel); + smallest = ~0; + for ( i=0; i<pal->ncolors; ++i ) { + rd = pal->colors[i].r - r; + gd = pal->colors[i].g - g; + bd = pal->colors[i].b - b; + distance = (rd*rd)+(gd*gd)+(bd*bd); + if ( distance < smallest ) { + pixel = i; + if ( distance == 0 ) { /* Perfect match! */ + break; + } + smallest = distance; + } + } + return(pixel); } Uint32 SpuDraw::get_rgb(int tx, int ty, void *texture) { - Uint8 red, green, blue, alpha; - - if (tx<0) tx = 0; - if (128-1< tx) tx = 128-1 ; - if (ty<0) ty = 0; - if (128-1< ty) ty = 128-1 ; +#if 1 + Uint8 red, green, blue, alpha; - char *p = get_pixel(tx,ty,texture); + if (tx<0) tx = 0; + if (128-1< tx) tx = 128-1 ; + if (ty<0) ty = 0; + if (128-1< ty) ty = 128-1 ; + + char *p = get_pixel(tx,ty,texture); - blue = (Uint8) p[0]; - green = (Uint8) p[1]; - red = (Uint8) p[2]; - - SDL_PixelFormat pf; - pf.BitsPerPixel = 32; - pf.BytesPerPixel = 4; - alpha = 255; + blue = (Uint8) p[0]; + green = (Uint8) p[1]; + red = (Uint8) p[2]; + + SDL_PixelFormat pf; + pf.BitsPerPixel = 32; + pf.BytesPerPixel = 4; + alpha = 255; - return SDL_MapRGB(&pf, red, green, blue); + return SDL_MapRGB(&pf, red, green, blue); +#else + return 0x900000; +#endif } - -//int spu_draw(SPUSPAN *ss, unsigned int fbdev_addr) -#if 0 int SpuDraw::run(void *rbuf, void *writebuf) { - SPUSPAN *ss = (SPUSPAN*)rbuf; - unsigned int fbdev_addr = task->out_addr; + SPANPACK_PTR sp = (SPANPACK_PTR)rbuf; + unsigned int fbdev_addr = task->out_addr; + SPAN_PTR span; + int ofset_x = 320; + int ofset_y = 240; + int width = IMG_MAX_X; + + __debug("[SpuDraw]:%s\n", __FUNCTION__); - SPANPACK_PTR spanPack; - SPAN_PTR; + int render_y = 0; - //void *texture = new char[128*128*3]; - void **buff; - void *texture; - long *addr = ss->spp[0].tex_addr; - //GLushort zRow[8][IMG_MAX_Y]; - GLushort *zRow; // あとで new - zRow = new GLushort[8][IMG_MAX_Y]; - int j = 0; - int render_y = 0; + zRow_init(); + linebuf_init(); + + //void *texture = CellScheduler::tex; - zRow_init(); - linebuf_init(j); - - render_y = ss->spp[0].span[0].y; - - for (int i = 0; i < 10; i++) { - spanPack = &ss->spp[i]; - - for (int t; t<ss->spp[i].info.size; t++) { - span = &spanPack->span[t]; + render_y = sp->span[0].y; + render_y += 1080/2; + render_y = (render_y/8)*8; + + for (int t = 0; t < sp->info.size; t++) { + span = &sp->span[t]; - int end = span->length_x; - Uint32 rgb; - float tex1 = span->tex_x1; - float tex2 = span->tex_x2; - float tey1 = span->tex_y1; - float tey2 = span->tex_y2; - int tex_xpos; - int tex_ypos; - int tex_zpos; - int x = span->x; - int y = span->y; - float z = span->start_z; - float zpos = span->end_z; - float tex_x, tex_y, tex_z; - - if (end == 1) { - tex_xpos = (int)((span->tex_height-1) * tex1); - tex_ypos = (int)((span->tex_width-1) * tey1); - tex_zpos = (int)z; + //__debug("span x = %d, y = %d\n", span->x, span->y); + int end = span->length_x; + Uint32 rgb = 0x00ff00; + float tex1 = span->tex_x1; + float tex2 = span->tex_x2; + float tey1 = span->tex_y1; + float tey2 = span->tex_y2; + int tex_xpos; + int tex_ypos; + int tex_zpos; + int x = span->x + ofset_x; + int y = span->y + ofset_y; + float z = span->start_z; + float zpos = span->end_z; + float tex_x, tex_y, tex_z; - if (z < zRow[x][y%8]) { - //rgb = get_rgb(tex_xpos,tex_ypos); + if (end == 1) { + tex_xpos = (int)((span->tex_height-1) * tex1); + tex_ypos = (int)((span->tex_width-1) * tey1); + tex_zpos = (int)z; + + if (z < zRow[x + (width*(y%8))]) { + //rgb = get_rgb(tex_xpos, tex_ypos, CellScheduler::tex); + zRow[x + (width*(y%8))] = z; + linebuf[(width*(y%8)) + x] = rgb; //viewer->write_pixel(x,y,zpos,rgb); - //linebuf[j][x][y%8] = rgb; - linebuf[x][y%8] = rgb - } - - } else { - //printf("end != 1\n"); - for (int j = 0; j < end; j++) { + } + } else { + for (int j = 0; j < end; j++) { tex_x = tex1*(end-1-j)/(end-1) + tex2*j/(end-1); tex_y = tey1*(end-1-j)/(end-1) + tey2*j/(end-1); tex_z = z*(end-1-j)/(end-1) + zpos*j/(end-1); @@ -216,99 +179,30 @@ tex_xpos = (int)((span->tex_height-1) * tex_x); tex_ypos = (int)((span->tex_width-1) * tex_y); - if (z < zRow[x][y%8]) { - //rgb = get_rgb(tex_xpos,tex_ypos); - linebuf[j][x][y%8] = rgb; - //viewer->write_pixel(j+x,y,tex_z,rgb); + if (z < zRow[x + j + (width*(y%8))]) { + //__debug("x = %d, y = %d, width = %d, end = %d\n", x, y, width, end); + //rgb = get_rgb(tex_xpos,tex_ypos,CellScheduler::tex); + zRow[j + x + (width*(y%8))] = z; + linebuf[j + (width*(y%8)) + x] = rgb; + //viewer->write_pixel(j+x,y,tex_z,rgb); } - } - } - } - writebuffer(j,fbdev_addr,render_y); - } - - return 0; -} -#else -int -SpuDraw::run(void *rbuf, void *writebuf) -{ - SPANPACK_PTR sp = (SPANPACK_PTR)rbuf; - unsigned int fbdev_addr = task->out_addr; - SPAN_PTR span; - - __debug("[SpuDraw]:%s\n", __FUNCTION__); - - //void *texture = new char[128*128*3]; - //void **buff; - //void *texture; - //long *addr = ss->spp[0].tex_addr; - //GLushort zRow[8][IMG_MAX_Y]; - //GLushort *zRow; // あとで new - //zRow = new GLushort[8][IMG_MAX_Y]; - int render_y = 0; - - zRow_init(); - linebuf_init(); + } + } + } + __debug("[SpuDraw]:run finish!!\n"); + writebuffer(0, fbdev_addr, render_y); - render_y = sp->span[0].y; - - //for (int t; t<sp->spp[i].info.size; t++) { - for (int t = 0; t < sp->info.size; t++) { - span = &sp->span[t]; - - int end = span->length_x; - Uint32 rgb = 0; - float tex1 = span->tex_x1; - float tex2 = span->tex_x2; - float tey1 = span->tex_y1; - float tey2 = span->tex_y2; - int tex_xpos; - int tex_ypos; - int tex_zpos; - int x = span->x; - int y = span->y; - float z = span->start_z; - float zpos = span->end_z; - float tex_x, tex_y, tex_z; - - if (end == 1) { - tex_xpos = (int)((span->tex_height-1) * tex1); - tex_ypos = (int)((span->tex_width-1) * tey1); - tex_zpos = (int)z; - - if (z < zRow[x][y%8]) { - //rgb = get_rgb(tex_xpos,tex_ypos); - linebuf[x][y%8] = rgb; - //viewer->write_pixel(x,y,zpos,rgb); - } - - } else { - for (int j = 0; j < end; j++) { - tex_x = tex1*(end-1-j)/(end-1) + tex2*j/(end-1); - tex_y = tey1*(end-1-j)/(end-1) + tey2*j/(end-1); - tex_z = z*(end-1-j)/(end-1) + zpos*j/(end-1); - if (tex_x > 1) tex_x = 1; - if (tex_y > 1) tex_y = 1; - tex_xpos = (int)((span->tex_height-1) * tex_x); - tex_ypos = (int)((span->tex_width-1) * tex_y); - - if (z < zRow[x][y%8]) { - //rgb = get_rgb(tex_xpos,tex_ypos); - linebuf[x][y%8] = rgb; - //viewer->write_pixel(j+x,y,tex_z,rgb); - } - } - } - } - writebuffer(0,fbdev_addr,render_y); - return 0; + free(rbuf); + return 0; } -#endif void SpuDraw::writebuffer(int i, unsigned int fbdev_addr, int y) { - spu_mfcdma32(&linebuf[0][0], fbdev_addr, PIXELSIZE, 21, MFC_PUT_CMD); + for (i = 0; i < 8; i++) { + spu_mfcdma32(&linebuf[i*IMG_MAX_X], fbdev_addr + (4*1920*(y+i)), + sizeof(int)*IMG_MAX_X, i+5, MFC_PUT_CMD); + connector->dma_wait(i+5); + } } @@ -316,5 +210,7 @@ createTask_spuDraw(TaskListPtr _taskList, TaskPtr _task, void *rbuff, void *wbuff, DmaManager *dma) { - return new SpuDraw(_taskList, _task, rbuff, wbuff, dma); + rbuff = memalign(16, sizeof(SPANPACK)); + + return new SpuDraw(_taskList, _task, rbuff, wbuff, dma); }
--- a/TaskManager/Test/simple_render/spe/SpuDraw.h Thu Feb 28 21:45:13 2008 +0900 +++ b/TaskManager/Test/simple_render/spe/SpuDraw.h Fri Feb 29 05:20:23 2008 +0900 @@ -5,11 +5,11 @@ # include "SchedTask.h" #endif -//#define IMG_MAX_Y 1080 -#define IMG_MAX_Y 480 +//#define IMG_MAX_X 1080 +#define IMG_MAX_X 512 #ifndef NULL -# define NULL ((void*)0) +# define NULL (0) #endif typedef int8_t Sint8; @@ -18,8 +18,7 @@ typedef uint16_t Uint16; typedef int32_t Sint32; typedef uint32_t Uint32; - -typedef unsigned short GLushort; +typedef unsigned short GLushort; typedef struct{ Uint8 r; @@ -53,10 +52,11 @@ ~SpuDraw(void); - //int linebuf[8][IMG_MAX_Y]; - //float zRow[8][IMG_MAX_Y]; - int **linebuf; - float **zRow; + //int linebuf[8][IMG_MAX_X]; + //float zRow[8][IMG_MAX_X]; + int *linebuf; + //int *linebuf; + float *zRow; int run(void *readbuf, void *writebuf); private:
--- a/TaskManager/Test/simple_render/spe/spe-main.cpp Thu Feb 28 21:45:13 2008 +0900 +++ b/TaskManager/Test/simple_render/spe/spe-main.cpp Fri Feb 29 05:20:23 2008 +0900 @@ -8,7 +8,12 @@ createTask_spuDraw(TaskListPtr _taskList, TaskPtr _task, void *rbuff, void *wbuff, DmaManager *dma); -SchedTask::TaskObject task_list[16];// = {0, 0, createTask_createPolygonPack, 0}; +extern SchedTask* +createTask_LoadTexture(TaskListPtr _taskList, TaskPtr _task, + void *rbuf, void *wbuf, DmaManager *dma); + + +SchedTask::TaskObject task_list[16]; static void set_task(int cmd, SchedTask::TaskObject task) @@ -22,5 +27,6 @@ task_init(void) { //set_task(2, createTask_createPolygonPack); - set_task(0, createTask_spuDraw); + set_task(0, createTask_LoadTexture); + set_task(1, createTask_spuDraw); }
--- a/TaskManager/Test/simple_render/task/create_span.cpp Thu Feb 28 21:45:13 2008 +0900 +++ b/TaskManager/Test/simple_render/task/create_span.cpp Fri Feb 29 05:20:23 2008 +0900 @@ -88,6 +88,7 @@ start_tex_y = tmp_tey1; end_tex_y = tmp_tey2; } + //printf("x:%d y:%d end:%d z:%f zpos:%f\n",x,y,length,start_z , end_z); //printf("start_tex_x:%f end_tex_x:%f start_tex_y:%f end_tex_y:%fn",start_tex_x,end_tex_x,start_tex_y,end_tex_y); @@ -101,6 +102,8 @@ //y -= 540; // window_height = 1080 (1080/2 = 540) y -= 240; // window_height = 480 (480/2 = 240) + //if (x < 0 || x > 576 || y > 384 || y < 0 ) continue; + int spu_no = line_set%6; int spp_no = line_set/6;
--- a/TaskManager/Test/simple_render/test/LoadTexture/spe/Load_Texture.cpp Thu Feb 28 21:45:13 2008 +0900 +++ b/TaskManager/Test/simple_render/test/LoadTexture/spe/Load_Texture.cpp Fri Feb 29 05:20:23 2008 +0900 @@ -98,9 +98,9 @@ SchedTask * createTask_LoadTexture(TaskListPtr _taskList, TaskPtr _task, - void *rbuf, void *wbuf, DmaManager *dma) { - CellScheduler::tex = memalign(DEFAULT_ALIGNMENT, DMA_MAX_SIZE*3); - rbuf = CellScheduler::tex; + void *rbuf, void *wbuf, DmaManager *dma) { + CellScheduler::tex = memalign(DEFAULT_ALIGNMENT, DMA_MAX_SIZE*3); + rbuf = CellScheduler::tex; - return new LoadTexture(_taskList, _task, rbuf, wbuf, dma); + return new LoadTexture(_taskList, _task, rbuf, wbuf, dma); }
--- a/TaskManager/Test/simple_render/viewer.cpp Thu Feb 28 21:45:13 2008 +0900 +++ b/TaskManager/Test/simple_render/viewer.cpp Fri Feb 29 05:20:23 2008 +0900 @@ -94,11 +94,11 @@ diffz1 = diffz; diffz = (zRow[x][y]>z); if (z < zRow[x][y]) { - if (x < width && x > 0 && y > 0 && y < height) { - zRow[x][y] = z; - y = height - y; - pixels[width*y + x] = rgb; - } + if (x < width && x > 0 && y > 0 && y < height) { + zRow[x][y] = z; + y = height - y; + pixels[width*y + x] = rgb; + } } } @@ -225,9 +225,11 @@ DmaBuffer *pp_buff; DmaBuffer *ssl_buff; -SPANPACK send_pack[10] __attribute__((aligned(16))); +SPANPACK send_pack[6][10] __attribute__((aligned(16))); unsigned int fbdev_addr; +void *__texture; + extern int get_fbdev_addr(void); void @@ -279,7 +281,7 @@ pixels = new Uint32[width*height]; - graph_line(); + //graph_line(); bitmap = SDL_CreateRGBSurfaceFrom((void *)pixels, width, height, 32, width*4, redMask, greenMask, @@ -288,6 +290,12 @@ fd = manager->open("ViewerRunLoop"); task = manager->create_task(fd, 0, 0, 0, NULL); task->spawn(); + + posix_memalign((void**)&__texture, 16, 128*128*3); + memcpy(__texture, polygon->texture_image->pixels, 128*128*3); + HTaskPtr task_init_tex = manager->create_task(0, 0, (uint32)__texture, 0, NULL); + task_init_tex->set_cpu(CPU_SPE); + task_init_tex->spawn(); fbdev_addr = get_fbdev_addr(); } @@ -325,7 +333,7 @@ //zRow_init(); // これ自身、一つのタスクとして回す方がよいか - graph_line(); + //graph_line(); fd_update_sgp = manager->open("UpdateSGP"); fd_create_pp = manager->open("CreatePP"); @@ -387,38 +395,42 @@ * 本当はタスクとして TestDraw を選ぶ */ -//#define DRAW_POLYGON -#define DRAW_SPANPACK +#define DRAW_POLYGON +//#define DRAW_SPANPACK //#define DRAW_SPUSPAN void Viewer::run_draw(void) { HTaskPtr task; - HTaskPtr task_draw[10]; + HTaskPtr task_draw[6][10]; int fd; fd = manager->open("ViewerRunLoop"); task = manager->create_task(fd, 0, 0, 0, NULL); - for (int i = 0; i < 10; i++) { - memcpy(&send_pack[i], &ssl->ss[0].spp[i], sizeof(SPANPACK)); - task_draw[i] - = manager->create_task(0, sizeof(SPANPACK), - (uint32)&send_pack[i], fbdev_addr, NULL); - task_draw[i]->set_cpu(CPU_SPE); - task->set_depend(task_draw[i]); - task_draw[i]->spawn(); +#if 1 + for (int j = 0; j < 6; j++) { + for (int i = 0; i < 10; i++) { + if (ssl->ss[j].spp[i].info.size < 1) continue; + memcpy(&send_pack[j][i], &ssl->ss[j].spp[i], sizeof(SPANPACK)); + task_draw[j][i] + = manager->create_task(1, sizeof(SPANPACK), + (uint32)&send_pack[j][i], fbdev_addr, NULL); + task_draw[j][i]->set_cpu(CPU_SPE); + task->set_depend(task_draw[j][i]); + task_draw[j][i]->spawn(); + } } - +#endif task->spawn(); SDL_BlitSurface(bitmap, NULL, screen, NULL); SDL_UpdateRect(screen, 0, 0, 0, 0); frames++; - + return; - + #if 0 // USE DOUBLE BUFFER PolygonPack *pp; SPUSPANLIST *ssl; @@ -449,6 +461,8 @@ polygon->draw(&ssl->ss[5]); # endif #endif + + return; } #if 0 @@ -475,6 +489,8 @@ delete polygon; //delete sgp_buff; //delete pp_buff; + + free(__texture); quit(); }