I thought a test I was doing finished rendering very quickly (progress jumped to 1.0 immediately) and then got stuck on finishing the frame, but with 2.7.0 it seems the first reported progress values are 1.0 initially. Perhaps it only gets set to 0 the moment rendering really starts?
diff --git a/apps/ospTutorial/ospTutorial.cpp b/apps/ospTutorial/ospTutorial.cpp
index 276ba7b9b..c8921278e 100644
--- a/apps/ospTutorial/ospTutorial.cpp
+++ b/apps/ospTutorial/ospTutorial.cpp
@@ -129,7 +129,12 @@ int main(int argc, const char **argv)
framebuffer.clear();
// render one frame
- framebuffer.renderFrame(renderer, camera, world);
+ ospray::cpp::Future f = framebuffer.renderFrame(renderer, camera, world);
+ while (!f.isReady())
+ {
+ printf("%.1f\n", f.progress());
+ usleep(500);
+ }
// access framebuffer and write its content as PPM file
uint32_t *fb = (uint32_t *)framebuffer.map(OSP_FB_COLOR);
With the above patch and some heavy load on the system the progress reported 1.0 more than once:
I thought a test I was doing finished rendering very quickly (progress jumped to 1.0 immediately) and then got stuck on finishing the frame, but with 2.7.0 it seems the first reported progress values are 1.0 initially. Perhaps it only gets set to 0 the moment rendering really starts?
With the above patch and some heavy load on the system the progress reported 1.0 more than once: