Mercurial > hg > Members > kono > Cerium
diff Renderer/Engine/viewer.cc @ 984:df5185513c2d
minor fix
author | root@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Fri, 01 Oct 2010 01:25:45 +0900 |
parents | ff74988bbb2a |
children | e40dd2384357 |
line wrap: on
line diff
--- a/Renderer/Engine/viewer.cc Fri Oct 01 00:37:06 2010 +0900 +++ b/Renderer/Engine/viewer.cc Fri Oct 01 01:25:45 2010 +0900 @@ -98,10 +98,6 @@ { this->manager = manager; - start_time = get_ticks(); - this_time = 0; - frames = 0; - if (spe_num == 0) spe_num = 1; sgroot = new SceneGraphRoot(this->width, this->height); @@ -160,6 +156,10 @@ data_load->spawn(); } + start_time = get_ticks(); + this_time = 0; + frames = 0; + MainLoop *mainloop = app->init(this, this->width, this->height); mainloop->mainLoop(); } @@ -947,10 +947,10 @@ data_update_wait->spawn(); if (profile) { if (frames % 50 == 49) { + manager->show_profile(); this_time = get_ticks(); - manager->show_profile(); if (this_time != start_time) { - printf("\n%f FPS\n", (((float)frames)/(this_time-start_time))*1000.0); + printf("\n%f FPS\n", ((((float)frames)*1000.0)/(this_time-start_time))); start_time = this_time; frames = 0; } }