Mercurial > hg > Game > Cerium
annotate Renderer/Engine/spe/DataAllocate.cc @ 915:aa9728394194 draft
create_polygon_task ..not worked yet.
author | yutaka@localhost.localdomain |
---|---|
date | Fri, 23 Jul 2010 18:05:40 +0900 |
parents | Renderer/Engine/spe/DataLoad.cc@c3b4ddd4ccdc |
children | b3a8545eb2fa |
rev | line source |
---|---|
749 | 1 #include <stdio.h> |
2 #include <string.h> | |
915
aa9728394194
create_polygon_task ..not worked yet.
yutaka@localhost.localdomain
parents:
823
diff
changeset
|
3 #include "DataAllocate.h" |
749 | 4 #include "Func.h" |
5 | |
6 /* これは必須 */ | |
915
aa9728394194
create_polygon_task ..not worked yet.
yutaka@localhost.localdomain
parents:
823
diff
changeset
|
7 SchedDefineTask(DataAllocate); |
749 | 8 |
9 static int | |
10 run(SchedTask *s, void *rbuf, void *wbuf) | |
11 { | |
12 | |
915
aa9728394194
create_polygon_task ..not worked yet.
yutaka@localhost.localdomain
parents:
823
diff
changeset
|
13 void *idata = s->get_input(rbuf, 0); |
823 | 14 long size = (long)s->get_param(0); |
15 long load_id = (long)s->get_param(1); | |
749 | 16 |
915
aa9728394194
create_polygon_task ..not worked yet.
yutaka@localhost.localdomain
parents:
823
diff
changeset
|
17 void *buff = s->global_alloc(load_id, size); |
aa9728394194
create_polygon_task ..not worked yet.
yutaka@localhost.localdomain
parents:
823
diff
changeset
|
18 |
aa9728394194
create_polygon_task ..not worked yet.
yutaka@localhost.localdomain
parents:
823
diff
changeset
|
19 if (idata != NULL) { |
aa9728394194
create_polygon_task ..not worked yet.
yutaka@localhost.localdomain
parents:
823
diff
changeset
|
20 memcpy(buff,idata,size); |
aa9728394194
create_polygon_task ..not worked yet.
yutaka@localhost.localdomain
parents:
823
diff
changeset
|
21 } |
749 | 22 |
23 return 0; | |
24 } | |
25 |