comparison TaskManager/Test/test_render/viewer.cc @ 454:c89b034ca2ea draft

Chain work
author kazz@henri.cr.ie.u-ryukyu.ac.jp
date Sat, 26 Sep 2009 00:17:04 +0900
parents 574be19530a5
children 60f44d3ea452
comparison
equal deleted inserted replaced
453:574be19530a5 454:c89b034ca2ea
23 int start_time; 23 int start_time;
24 int this_time; 24 int this_time;
25 int frames; 25 int frames;
26 26
27 SceneGraphRootPtr sgroot; 27 SceneGraphRootPtr sgroot;
28 SceneGraphRootPtr sgroot_2; 28 //SceneGraphRootPtr sgroot_2;
29 29
30 /* Data Pack sent to Other CPUs (ex. SPE) */ 30 /* Data Pack sent to Other CPUs (ex. SPE) */
31 SceneGraphPack *sgpack; 31 SceneGraphPack *sgpack;
32 PolygonPack *ppack; 32 PolygonPack *ppack;
33 SpanPackPtr spackList; 33 SpanPackPtr spackList;
113 start_time = get_ticks(); 113 start_time = get_ticks();
114 this_time = 0; 114 this_time = 0;
115 frames = 0; 115 frames = 0;
116 116
117 sgroot = new SceneGraphRoot(this->width, this->height); 117 sgroot = new SceneGraphRoot(this->width, this->height);
118 sgroot_2 = new SceneGraphRoot(this->width, this->height); 118 // sgroot_2 = new SceneGraphRoot(this->width, this->height);
119 //sgroot->createFromXMLFile(xml); 119 //sgroot->createFromXMLFile(xml);
120 // ここの switch は application->init(this, manager, sg_no); になるべき 120 // ここの switch は application->init(this, manager, sg_no); になるべき
121 switch (sg_number) { 121 switch (sg_number) {
122 case 0: 122 case 0:
123 case 1: 123 case 1:
161 case 15: 161 case 15:
162 vacuum_init2(manager, this->width, this->height); 162 vacuum_init2(manager, this->width, this->height);
163 break; 163 break;
164 case 16: 164 case 16:
165 app = new Chain(); 165 app = new Chain();
166 app->init(manager, this->width, this-> height); 166 app->init(manager, this->width, this->height);
167 speLoop(); 167 speLoop();
168 return; 168 return;
169 break; 169 break;
170 case 17: 170 case 17:
171 chain_old_init(manager, this->width, this-> height); 171 chain_old_init(manager, this->width, this->height);
172 break; 172 break;
173 default: 173 default:
174 node_init(manager); 174 node_init(manager);
175 break; 175 break;
176 } 176 }
539 if (this_time != start_time) { 539 if (this_time != start_time) {
540 printf("%f FPS\n", (((float)frames)/(this_time-start_time))*1000.0); 540 printf("%f FPS\n", (((float)frames)/(this_time-start_time))*1000.0);
541 } 541 }
542 542
543 delete sgroot; 543 delete sgroot;
544 delete sgroot_2; 544 // delete sgroot_2;
545 quit(); 545 quit();
546 } 546 }
547 547
548 /* end */ 548 /* end */