Mercurial > hg > Game > Cerium
view example/share_task/ppe/Load.cc @ 130:40978d4b608a draft
テクスチャの大きさを128x128以外にも使えるように。(若干バグ有り)
author | gongo@gendarme.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Tue, 25 Nov 2008 17:19:43 +0900 |
parents | 028ffc9c0375 |
children | 768452fab95e |
line wrap: on
line source
#include <stdio.h> #include <string.h> #include "Load.h" #include "Func.h" /* ɬ */ SchedDefineTask(Load); int Load::run(void *rbuf, void *wbuf) { int *idata = (int*)get_input(rbuf, 0); int *odata = (int*)global_get(DATA_ID); int length = get_param(0); // SPU LS ΰݤǡԡ odata = (int*)global_alloc(DATA_ID, sizeof(int)*length); memcpy(odata, idata, sizeof(int)*length); printf("[TASK_LOAD] "); for (int i = 0; i < length; i++) { printf("%03d ", idata[i]); } printf("\n"); return 0; }