Mercurial > hg > Game > Cerium
comparison TaskManager/Test/test_render/viewer.cpp @ 184:a19d3ed4ce5b draft
fix
author | gongo@gendarme.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Tue, 06 Jan 2009 15:39:48 +0900 |
parents | e3b7776b1420 |
children | 4f85911aa183 |
comparison
equal
deleted
inserted
replaced
182:8e9ada0c1ed0 | 184:a19d3ed4ce5b |
---|---|
26 PolygonPack *ppack; | 26 PolygonPack *ppack; |
27 SpanPackPtr spackList; | 27 SpanPackPtr spackList; |
28 SpanPackPtr *spackList_ptr; | 28 SpanPackPtr *spackList_ptr; |
29 int spackList_length; | 29 int spackList_length; |
30 int spackList_length_align; | 30 int spackList_length_align; |
31 | |
32 static float *zRow; | |
33 | 31 |
34 /** | 32 /** |
35 * | 33 * |
36 */ | 34 */ |
37 | 35 |
204 task_next->wait_for(task_tex); | 202 task_next->wait_for(task_tex); |
205 task_tex->spawn(); | 203 task_tex->spawn(); |
206 } | 204 } |
207 | 205 |
208 task_next->spawn(); | 206 task_next->spawn(); |
209 | |
210 zRow=(float*)manager->malloc(sizeof(float)*split_screen_w*split_screen_h); | |
211 | |
212 for (int i = 0; i < split_screen_w*split_screen_h; i++) { | |
213 zRow[i] = 65535.0f; // __FLT_MAX__ とかでも | |
214 } | |
215 } | 207 } |
216 | 208 |
217 void | 209 void |
218 Viewer::run_loop(void) | 210 Viewer::run_loop(void) |
219 { | 211 { |
331 while (startx < this->width) { | 323 while (startx < this->width) { |
332 if (spack->info.size > 0) { | 324 if (spack->info.size > 0) { |
333 // Draw SpanPack | 325 // Draw SpanPack |
334 task_draw = manager->create_task(TASK_DRAW_SPAN); | 326 task_draw = manager->create_task(TASK_DRAW_SPAN); |
335 task_draw->add_inData(spack, sizeof(SpanPack)); | 327 task_draw->add_inData(spack, sizeof(SpanPack)); |
336 | |
337 task_draw->add_inData(zRow, | |
338 sizeof(float)*(endx-startx+1)*rangey); | |
339 } else { | 328 } else { |
340 // Draw Background (現在は塗りつぶし) | 329 // Draw Background (現在は塗りつぶし) |
341 task_draw = manager->create_task(TASK_DRAW_BACK); | 330 task_draw = manager->create_task(TASK_DRAW_BACK); |
342 task_draw->add_param(0xffffffff); | 331 task_draw->add_param(0xffffffff); |
343 } | 332 } |