Mercurial > hg > Members > kono > Cerium
comparison TaskManager/Test/test_render/spe/DrawBack.cpp @ 109:5c194c71eca8
Cerium cvs version
author | gongo@gendarme.local |
---|---|
date | Wed, 12 Nov 2008 17:39:33 +0900 |
parents | |
children | 2ddf79a7c5fb 81b25e5d5379 |
comparison
equal
deleted
inserted
replaced
108:6f3b3dd3c095 | 109:5c194c71eca8 |
---|---|
1 #include <stdlib.h> | |
2 #include <string.h> | |
3 #include "DrawBack.h" | |
4 #include "viewer_types.h" | |
5 | |
6 SchedDefineTask(DrawBack); | |
7 | |
8 void | |
9 DrawBack::linebuf_init(int *buf, int x, int rgb) | |
10 { | |
11 for (int i = 0; i < x; i++) { | |
12 buf[i] = rgb; | |
13 } | |
14 } | |
15 | |
16 int | |
17 DrawBack::run(void *rbuf, void *wbuf) | |
18 { | |
19 int rgb = smanager->get_param(0); | |
20 int rangex_start = smanager->get_param(1); | |
21 int rangex_end = smanager->get_param(2); | |
22 int rangey = smanager->get_param(3); | |
23 int rangex = rangex_end - rangex_start + 1; | |
24 int *linebuf; | |
25 | |
26 for (int i = 0; i < rangey; i++) { | |
27 linebuf = (int*)smanager->get_output(i); | |
28 linebuf_init(linebuf, rangex, rgb); | |
29 } | |
30 | |
31 return 0; | |
32 } |