Hi, I’m trying to render a 3d volume. To catch error events I use ErrorObserver example.
After the pipeline setup, I do ResetCamera() and Render(), but the return of the Render() function doesn’t guarantee that no errors will come after that:
renderer->ResetCamera();
renderWindow->Render();
std::cout << “we don’t know if the rendering was successful, the ErrorObserver could be called even after this point”;
My question is, how do I know if the rendering was successful?
I think the problem here is the opposite: How to detect if no error happened. As @mykolav is saying, the observer will be called asynchronously when an error happened. But from the async call, its hard (or impossible) to know when no error happened. For example, we had an error from a large memory allocation that came seconds later after the rendering method completed!
So its hard to say at which point in time the rending is finished and all errors should be delivered. We can start a timer and wait, but what is a “good” waiting time? Seconds? Minutes?
This is the question here: Is there a signal saying something like “The rendering is finished, if there was no error yet you can stop waiting for one”?
I suggest you to google after the class names. It’s likely they have been moved elsewhere. It also helps the community if you report broken links in that topic.