Mercurial > hg > Members > kono > Cerium
annotate Renderer/Test/spe/Property.cc @ 965:1089f24bc86a
removing user task from Renderer Engine
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 06 Aug 2010 19:59:23 +0900 |
parents | Renderer/Engine/spe/Property.cc@87390c99c900 |
children |
rev | line source |
---|---|
756
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
1 #include <stdio.h> |
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
2 #include <string.h> |
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
3 #include <math.h> |
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
4 #include "Property.h" |
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
5 #include "Func.h" |
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
6 #include "types.h" |
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
7 |
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
8 /* これは必須 */ |
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
9 SchedDefineTask(PropertyTask); |
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
10 |
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
11 typedef struct { |
758 | 12 float xyz[3]; |
13 const char *name; | |
756
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
14 } Property, *PropertyPtr; |
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
15 |
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
16 static int |
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
17 run(SchedTask *s,void *rbuf, void *wbuf) |
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
18 { |
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
19 PropertyPtr property = (PropertyPtr)s->get_input(rbuf, 0); |
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
20 PropertyPtr update_property = (PropertyPtr)s->get_output(wbuf, 0); |
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
21 |
758 | 22 property->xyz[0] += 1.0f; |
23 property->xyz[1] += 1.0f; | |
24 property->xyz[2] += 1.0f; | |
756
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
25 |
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
26 memcpy((void*)update_property, (void*)property, sizeof(Property)); |
763 | 27 |
756
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
28 return 0; |
2575791a333a
add Test/create_task {spe, task}/Property
hiroki@henri.cr.ie.u-ryukyu.ac.jp
parents:
diff
changeset
|
29 } |