vtkQuadric SetCoefficients change not executed in C++, but is in Python

I modified the ImplicitQuadric vtk-example in Python to morph the surface within a loop by changing the SetCoefficients for vtkQuadric functions for a vtkImplicitBoolean. I ported this code to C++ and the first Surface is rendered properly, and manual mods of the initial Coefficients take effect, but I have spent a day with similar and different orders and using ->Modified() and ->Update and I verified the coefficients are being updated, but the rendering pipeline is not updating properly with the new coefficients. I checked whether other steps in the pipeline are frozen too. What is the difference between Python and C++ pipeline execution in general? Thanks

Next day: I have a suspicion. On the Mac, using the CMake/Makefile in the vtk-example, a flashing app icon appears in the toolbar even though I am rendering offscreen. So I think the first renderwindow.Render() is stuck in a loop it can’t exit even though the loop continues. I made some other vtkTransform modifications and they don’t appear either, so the render buffer is not being updated. I may try disabling Cocoa in the build, but it is necessary for everything else. Or I will build it in my OSMesa VTK and see if that works first. So my new question is, how do I force the Cocoa app to render properly offscreen in a loop. It is 99% there in C++, and 100% there in Python. Thanks again.

I ran the same code on a Mac and a Linux server with OSMesa that are both working with the initial Python version in all cases, but the supposedly equivalent C++ version is not updating the render buffer despite several workaround tries. According to the runtime analysis, the pipeline stages appear to be spending time updating, and I am certain the coefficients and transform tests should have changed the output. I am using the WindowToImageFilter writer in all cases.

It turns out that something got lost in the translation from ImageWriter.dxx that uses a separate WriteImage function. I had previously written a python software renderer without difficulty. But something about WriteImage creating and destroying the WindowToImageFilter allows it to refresh or retrieve the updated render buffer. I would appreciate an explanation about the why that is necessary though, because my attempt to simplify it caused me a lot of grief. I mistakenly believed my Python version was working before I migrated it to C++, but I had to step back to a previous Python version to get one that really was working, using the WriteImage function. Thanks.