diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TaskManager/Test/test_render/spe/DrawBack.cpp	Wed Nov 12 17:39:33 2008 +0900
@@ -0,0 +1,32 @@
+#include <stdlib.h>
+#include <string.h>
+#include "DrawBack.h"
+#include "viewer_types.h"
+
+SchedDefineTask(DrawBack);
+
+void
+DrawBack::linebuf_init(int *buf, int x, int rgb)
+{
+    for (int i = 0; i < x; i++) {
+	buf[i] = rgb;
+    }
+}
+
+int
+DrawBack::run(void *rbuf, void *wbuf)
+{
+    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;
+}