Mercurial > hg > Members > kono > Cerium
comparison Renderer/test_render/spe/DrawBack.cpp @ 283:55ea4465b1a2
fix test_render
author | e065746@localhost.localdomain |
---|---|
date | Fri, 05 Jun 2009 16:49:12 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
282:ef061be0baff | 283:55ea4465b1a2 |
---|---|
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 } |