Mercurial > hg > Members > kono > Cerium
view TaskManager/Test/test_render/spe/DrawBack.cc @ 472:699ee087234e
fix spe test_render
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 02 Oct 2009 23:20:25 +0900 |
parents | 44c0bce54dcf |
children |
line wrap: on
line source
// #define DEBUG #include "error.h" #include <stdlib.h> #include <string.h> #include "DrawBack.h" #include "viewer_types.h" SchedDefineTask(DrawBack); static void linebuf_init(int *buf, int x, int rgb) { for (int i = 0; i < x; i++) { buf[i] = rgb; } } static int run(SchedTask *smanager, void *rbuf, void *wbuf) { __debug_spe("DrawBack\n"); int rgb = smanager->get_param(0); int rangex_start = smanager->get_param(1); int rangex_end = smanager->get_param(2); int rangey = smanager->get_param(3); int rangex = rangex_end - rangex_start + 1; int *linebuf; for (int i = 0; i < rangey; i++) { linebuf = (int*)smanager->get_output(i); linebuf_init(linebuf, rangex, rgb); } return 0; }