ospray
ospray copied to clipboard
API deficiency: future is lacking completion callback
Rendering future can be waited, its state can be checked. Although there's no way to report when it completes. As a result, event-driven applications are forced to either move rendering to separate thread (nullifying any usefulness of out-of-the-box async rendering) or repeatedly checking future state in loop. Would it be possible to add ospRenderFrame
variant which accepts completion callback? Or some API which adds such completion callback to already created future?
Before the OSPFuture
we indeed had a "progress-and-cancel" callback. There are some upcoming chances to the futures in the mid-term, we'll consider your input.
I can confirm that, as a developer of a desktop application integrating OSPRay, I was facing the some problem. I unfortunately had to work around this limitation by repeatedly polling the future every 20 milliseconds or so to detect the completion of the rendering process. I agree that a callback mechanism would be very useful to have.