Mercurial > hg > Members > kono > Cerium
diff Renderer/Engine/viewer.cc @ 1004:67ff44a08090
add GTaskArray and merge.
author | koba <koba@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 26 Oct 2010 17:34:41 +0900 |
parents | 295b3c79fb44 ad5232ad4952 |
children | 34a9ba655fbe 431936c0cc96 |
line wrap: on
line diff
--- a/Renderer/Engine/viewer.cc Tue Oct 26 17:29:50 2010 +0900 +++ b/Renderer/Engine/viewer.cc Tue Oct 26 17:34:41 2010 +0900 @@ -34,7 +34,7 @@ RederingData r[2]; -int ppi, spi; +int ppi, spi = 0; /** * @@ -292,7 +292,7 @@ { HTaskPtr task_next = initLoop(); - task_next->set_post(&post2runLoop, (void *)this, 0); // set_post(function(this->run_loop()), NULL) + task_next->set_post(&post2runLoop, (void *)this, (void*)pixels); // set_post(function(this->run_loop()), NULL) task_next->spawn(); } @@ -310,6 +310,7 @@ } dev->clean_pixels(); + pixels = dev->flip_screen(pixels); sgroot->updateControllerState(); @@ -363,6 +364,8 @@ static void post2runLoop(SchedTask *s, void *viewer_, void *arg) { + + Viewer *viewer = (Viewer*)viewer_; HTaskPtr task_next = viewer->manager->create_task(Dummy,0,0,0,0); viewer->run_loop(task_next); @@ -383,7 +386,7 @@ { common_draw(task_next); - task_next->set_post(post2runLoop, (void*)this, 0); // set_post(function(this->run_loop()), NULL) + task_next->set_post(post2runLoop, (void*)this, (void*)pixels); // set_post(function(this->run_loop()), NULL) task_next->spawn(); // TASK_DRAW_SPAN が全て終わったら DUMMY_TASK が Viewer::run_loop() を呼ぶ @@ -909,7 +912,7 @@ if (profile) { if (frames % 50 == 49) { - manager->show_profile(); + manager->show_profile(); this_time = get_ticks(); if (this_time != start_time) { printf("\n%f FPS\n", ((((float)frames)*1000.0)/(this_time-start_time)));