Mercurial > hg > Members > kono > Cerium
comparison Renderer/Engine/task/DataAllocate.cc @ 986:ac437c3cf766 akira
double buffering of spanpack/polgonpack
not yet worked.
author | root@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Fri, 01 Oct 2010 03:42:25 +0900 |
parents | ad10d6d39ca6 |
children | 0b6f8c82625a |
comparison
equal
deleted
inserted
replaced
985:e40dd2384357 | 986:ac437c3cf766 |
---|---|
8 | 8 |
9 static int | 9 static int |
10 run(SchedTask *s, void *rbuf, void *wbuf) | 10 run(SchedTask *s, void *rbuf, void *wbuf) |
11 { | 11 { |
12 | 12 |
13 long size = (long)s->get_param(0); | 13 int count = (int)s->get_input(rbuf, 0); |
14 long load_id = (long)s->get_param(1); | 14 for(int i=0;i<count;i++) { |
15 void *idata = s->get_input(rbuf, i); | |
16 long size = (long)s->get_param(i*2+1); | |
17 long load_id = (long)s->get_param(i*2+2); | |
15 | 18 |
16 //printf("size %d",sizeof(float)*length); | 19 void *buff = s->global_alloc(load_id, size); |
17 | 20 if (idata != NULL) { |
18 s->global_alloc(load_id, size); | 21 memcpy(buff,idata,size); |
19 | 22 } |
20 //MemList *ml = s->createMemList(length,length); | 23 } |
21 //s->global_set(load_id, (void *)ml); | |
22 | 24 |
23 return 0; | 25 return 0; |
24 } | 26 } |
25 | 27 |