Mercurial > hg > Game > Cerium
annotate Renderer/Engine/spe/DrawBack.cc @ 1161:cc1a50cac83d draft
use MemorySegment API for pp load. do not check execution of the cell side. to be continued..
author | Yutaka_Kinjyo |
---|---|
date | Thu, 05 May 2011 00:15:43 +0900 |
parents | 0e91ddaad798 |
children | 0f8bee7eed3c |
rev | line source |
---|---|
539 | 1 // #define DEBUG |
2 #include "error.h" | |
3 | |
4 #include <stdlib.h> | |
5 #include <string.h> | |
6 #include "DrawBack.h" | |
7 #include "viewer_types.h" | |
8 | |
9 SchedDefineTask(DrawBack); | |
10 | |
11 static void | |
12 linebuf_init(int *buf, int x, int rgb) | |
13 { | |
14 for (int i = 0; i < x; i++) { | |
15 buf[i] = rgb; | |
16 } | |
17 } | |
18 | |
19 static int | |
20 run(SchedTask *smanager, void *rbuf, void *wbuf) | |
21 { | |
22 __debug_spe("DrawBack\n"); | |
626
0e91ddaad798
64bit mode compatibility on Cell
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
539
diff
changeset
|
23 int rgb = (long)smanager->get_param(0); |
0e91ddaad798
64bit mode compatibility on Cell
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
539
diff
changeset
|
24 int rangex_start = (long)smanager->get_param(1); |
0e91ddaad798
64bit mode compatibility on Cell
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
539
diff
changeset
|
25 int rangex_end = (long)smanager->get_param(2); |
0e91ddaad798
64bit mode compatibility on Cell
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
539
diff
changeset
|
26 int rangey = (long)smanager->get_param(3); |
539 | 27 int rangex = rangex_end - rangex_start + 1; |
28 int *linebuf; | |
29 | |
30 for (int i = 0; i < rangey; i++) { | |
31 linebuf = (int*)smanager->get_output(i); | |
32 linebuf_init(linebuf, rangex, rgb); | |
33 } | |
34 | |
35 return 0; | |
36 } |