Mercurial > hg > Members > kono > Cerium
comparison Renderer/Engine/SgChange.cc @ 725:3c05b9e518ac
Light data load fix (general load routine)
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 19 Dec 2009 15:02:43 +0900 |
parents | 6d11ecef3b74 |
children | 9136cf9186b6 |
comparison
equal
deleted
inserted
replaced
724:6d11ecef3b74 | 725:3c05b9e518ac |
---|---|
95 sgroot_A = new SceneGraphRoot(this->width, this->height); | 95 sgroot_A = new SceneGraphRoot(this->width, this->height); |
96 sgroot_A->tmanager = manager; | 96 sgroot_A->tmanager = manager; |
97 sgroot_B = new SceneGraphRoot(this->width, this->height); | 97 sgroot_B = new SceneGraphRoot(this->width, this->height); |
98 sgroot_B->tmanager = manager; | 98 sgroot_B->tmanager = manager; |
99 | 99 |
100 int size = 4; | 100 int size = sizeof(float)*4; |
101 light_xyz[0] = 0.0f; | 101 light_xyz[0] = 0.0f; |
102 light_xyz[1] = 0.0f; | 102 light_xyz[1] = 0.0f; |
103 light_xyz[2] = 0.0f; | 103 light_xyz[2] = 0.0f; |
104 light_xyz[3] = 0.0f; | 104 light_xyz[3] = 0.0f; |
105 | 105 |
346 HTaskPtr task_draw; | 346 HTaskPtr task_draw; |
347 | 347 |
348 //Light info update | 348 //Light info update |
349 HTaskPtr data_update; | 349 HTaskPtr data_update; |
350 HTaskPtr data_update_wait; | 350 HTaskPtr data_update_wait; |
351 int size = 4; | 351 int size = sizeof(float)*4; |
352 | 352 |
353 light_xyz[0] = light_xyz_stock[0]; | 353 light_xyz[0] = light_xyz_stock[0]; |
354 light_xyz[1] = light_xyz_stock[1]; | 354 light_xyz[1] = light_xyz_stock[1]; |
355 light_xyz[2] = light_xyz_stock[2]; | 355 light_xyz[2] = light_xyz_stock[2]; |
356 light_xyz[3] = light_xyz_stock[3]; | 356 light_xyz[3] = light_xyz_stock[3]; |
357 | 357 |
358 data_update_wait = manager->create_task(DataUpdate); | 358 data_update_wait = manager->create_task(DataUpdate); |
359 data_update_wait->add_inData(light_xyz, sizeof(float)*size); | 359 data_update_wait->add_inData(light_xyz, size); |
360 data_update_wait->set_param(0, size); | 360 data_update_wait->set_param(0, size); |
361 data_update_wait->set_param(1, LOAD_ID); | 361 data_update_wait->set_param(1, LOAD_ID); |
362 data_update_wait->set_cpu((CPU_TYPE)((int)SPE_0)); | 362 data_update_wait->set_cpu((CPU_TYPE)((int)SPE_0)); |
363 | 363 |
364 for (int i = 1; i < spe_num; i++) { | 364 for (int i = 1; i < spe_num; i++) { |