Mercurial > hg > Game > Cerium
view Renderer/Engine/spe/DataUpdate.cc @ 1087:20f09564c586 draft
fix (not yet tested)
author | root@localhost.localdomain |
---|---|
date | Fri, 17 Dec 2010 18:34:29 +0900 |
parents | 37bd2b0694e2 |
children | 801d57ae1e29 |
line wrap: on
line source
#include <stdio.h> #include "DataUpdate.h" #include "Func.h" #include "string.h" /* これは必須 */ SchedDefineTask(DataUpdate); static int run(SchedTask *s, void *rbuf, void *wbuf) { long count = (long)s->get_param(0); long id_base = (long)s->get_param(1); for(int i=0; i<count; i++) { void *idata = (void*)s->get_input(rbuf, i); long size = (long)s->get_inputSize(i); void *global_data = (void*)s->global_get(id_base+i); memcpy(global_data,idata,size); } return 0; }