annotate TaskManager/Test/test_render/spe/DrawBack.cpp @ 131:805d27efafd8

fix
author gongo@charles.cr.ie.u-ryukyu.ac.jp
date Tue, 25 Nov 2008 17:24:18 +0900
parents 5c194c71eca8
children 2ddf79a7c5fb 81b25e5d5379
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
1 #include <stdlib.h>
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
2 #include <string.h>
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
3 #include "DrawBack.h"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
4 #include "viewer_types.h"
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
5
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
6 SchedDefineTask(DrawBack);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
7
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
8 void
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
9 DrawBack::linebuf_init(int *buf, int x, int rgb)
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
10 {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
11 for (int i = 0; i < x; i++) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
12 buf[i] = rgb;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
13 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
14 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
15
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
16 int
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
17 DrawBack::run(void *rbuf, void *wbuf)
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
18 {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
19 int rgb = smanager->get_param(0);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
20 int rangex_start = smanager->get_param(1);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
21 int rangex_end = smanager->get_param(2);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
22 int rangey = smanager->get_param(3);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
23 int rangex = rangex_end - rangex_start + 1;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
24 int *linebuf;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
25
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
26 for (int i = 0; i < rangey; i++) {
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
27 linebuf = (int*)smanager->get_output(i);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
28 linebuf_init(linebuf, rangex, rgb);
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
29 }
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
30
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
31 return 0;
5c194c71eca8 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
32 }