diff TaskManager/Test/test_render/spe/DrawSpan.cpp @ 177:e742053c4c87

zRow の生成、初期化の変更
author gongo@localhost.localdomain
date Tue, 16 Dec 2008 17:16:35 +0900
parents 559b48b69b76
children 5cde66c926b4
line wrap: on
line diff
--- a/TaskManager/Test/test_render/spe/DrawSpan.cpp	Tue Dec 16 17:01:24 2008 +0900
+++ b/TaskManager/Test/test_render/spe/DrawSpan.cpp	Tue Dec 16 17:16:35 2008 +0900
@@ -81,22 +81,6 @@
     }
 }
 
-float*
-DrawSpan::zRow_init(int w, int h)
-{
-    float *zRow = NULL;
-    float z = 65535.0f;
-    int length = w*h;
-
-    zRow = (float*)smanager->allocate(sizeof(float)*length);
-
-    for (int i = 0; i < length; i++) {
-	zRow[i] = z;
-    }
-
-    return zRow;
-}
-
 Uint32
 DrawSpan::get_rgb(int tx, int ty, uint32 *addr)
 {
@@ -153,8 +137,8 @@
     int rangex_end    = get_param(1); //  (start <= x <= end)
     int rangey        = get_param(2); // y ϰ (render_y + rangey - 1)
     int rangex        = rangex_end - rangex_start + 1;
-
-    float *zRow = zRow_init(rangex, rangey);
+    
+    float *zRow = (float*)smanager->get_input(1);
     int **linebuf = (int**)smanager->allocate(sizeof(int*)*rangey);
 
     for (int i = 0; i < rangey; i++) {
@@ -274,7 +258,6 @@
 
     free(free_sp);
     free(linebuf);
-    free(zRow);
 
     return 0;
 }