Mercurial > hg > Members > kono > Cerium
comparison Renderer/Engine/viewer.cc @ 988:0b6f8c82625a akira
fix for double buffer
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 02 Oct 2010 03:48:39 +0900 |
parents | ac437c3cf766 |
children | 0b8f9d4d7dab |
comparison
equal
deleted
inserted
replaced
987:5eb651827ae3 | 988:0b6f8c82625a |
---|---|
113 | 113 |
114 | 114 |
115 for(int i = 0; i < spe_num; i++) { | 115 for(int i = 0; i < spe_num; i++) { |
116 HTaskPtr data_load = manager->create_task(DataAllocate); | 116 HTaskPtr data_load = manager->create_task(DataAllocate); |
117 data_load->set_param(0,(memaddr)3); // num of allocate block | 117 data_load->set_param(0,(memaddr)3); // num of allocate block |
118 data_load->set_param(0,(memaddr)(sizeof(float)*4*light_num)); // 1st allocate size | 118 data_load->set_param(1,(memaddr)(sizeof(float)*4*light_num)); // 1st allocate size |
119 data_load->set_param(1,(memaddr)Light); // 1st id | 119 data_load->set_param(2,(memaddr)Light); // 1st id |
120 data_load->set_param(0,(memaddr)(light_num * sizeof(int))); // 2nd size | 120 data_load->set_param(3,(memaddr)(light_num * sizeof(int))); // 2nd size |
121 data_load->set_param(1,(memaddr)LightSwitch); // 2nd id | 121 data_load->set_param(4,(memaddr)LightSwitch); // 2nd id |
122 data_load->set_param(0,(memaddr)16); // 3rd size | 122 data_load->set_param(5,(memaddr)16); // 3rd size |
123 data_load->set_param(1,(memaddr)LightSysSwitch); // 3rd id | 123 data_load->set_param(6,(memaddr)LightSysSwitch); // 3rd id |
124 data_load->set_cpu((CPU_TYPE)((int)SPE_0 + i)); | 124 data_load->set_cpu((CPU_TYPE)((int)SPE_0 + i)); |
125 data_load->spawn(); | 125 data_load->spawn(); |
126 } | 126 } |
127 | 127 |
128 light_switch = (int*)manager->allocate(size); | 128 light_switch = (int*)manager->allocate(size); |
174 | 174 |
175 /* 各 SPU が持つ、SpanPack の address list */ | 175 /* 各 SPU が持つ、SpanPack の address list */ |
176 r[i].spackList_ptr = | 176 r[i].spackList_ptr = |
177 (SpanPack**)manager->allocate(sizeof(SpanPack*)*r[i].spackList_length_align); | 177 (SpanPack**)manager->allocate(sizeof(SpanPack*)*r[i].spackList_length_align); |
178 | 178 |
179 for (int j = 0; i < r[i].spackList_length; i++) { | 179 for (int j = 0; j < r[i].spackList_length; j++) { |
180 r[i].spackList_ptr[j] = &r[i].spackList[j]; | 180 r[i].spackList_ptr[j] = &r[i].spackList[j]; |
181 } | 181 } |
182 | 182 |
183 for (int j = 1; j <= r[i].spackList_length; i++) { | 183 for (int j = 1; j <= r[i].spackList_length; j++) { |
184 r[i].spackList[j-1].init(j*split_screen_h); | 184 r[i].spackList[j-1].init(j*split_screen_h); |
185 } | 185 } |
186 } | 186 } |
187 | 187 |
188 task_next = manager->create_task(Dummy,0,0,0,0); | 188 task_next = manager->create_task(Dummy,0,0,0,0); |