Mercurial > hg > Members > kono > Cerium
annotate Renderer/Engine/spe/DataUpdate.cc @ 725:3c05b9e518ac
Light data load fix (general load routine)
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 19 Dec 2009 15:02:43 +0900 (2009-12-19) |
parents | 72d8bd31fc8c |
children | 4455e7b0caf3 |
rev | line source |
---|---|
686 | 1 #include <stdio.h> |
2 #include "DataUpdate.h" | |
3 #include "Func.h" | |
725
3c05b9e518ac
Light data load fix (general load routine)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
686
diff
changeset
|
4 #include "string.h" |
686 | 5 |
6 /* これは必須 */ | |
7 SchedDefineTask(DataUpdate); | |
8 | |
9 static int | |
10 run(SchedTask *s, void *rbuf, void *wbuf) | |
11 { | |
12 | |
725
3c05b9e518ac
Light data load fix (general load routine)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
686
diff
changeset
|
13 void *idata = (void*)s->get_input(rbuf, 0); |
3c05b9e518ac
Light data load fix (general load routine)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
686
diff
changeset
|
14 int size = (int)s->get_param(0); |
3c05b9e518ac
Light data load fix (general load routine)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
686
diff
changeset
|
15 int load_id = (int)s->get_param(1); |
3c05b9e518ac
Light data load fix (general load routine)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
686
diff
changeset
|
16 void *global_data = (void*)s->global_get(load_id); |
686 | 17 |
725
3c05b9e518ac
Light data load fix (general load routine)
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
686
diff
changeset
|
18 memcpy(global_data,idata,size); |
686 | 19 |
20 return 0; | |
21 } |