I chatted with Andy earlier today in regards to problems that he and Nathan were having to get Cycles to execute inside of a standard Rhino viewport. Their difficulty was stemming from the fact that they were attempting to create a CRhinoDisplayPipeline_OGL subclass and overriding some of the functions in order to inject their own code in appropriate locations. This difficulty is getting multiplied by the fact that they are attempting to do this in C# and are dealing with the MFC CRuntimeClass class which really doesn’t work to well on Mac (at least in our current Mac code.)
After thinking about this for a while, we already have a mechanism for injecting code in the pipeline and changing how it works… CRhinoDisplayConduit
I propose that we add what you guys find to be necessary to the display conduit class, be it new notifications like PREDRAWMIDDLEGROUND and PREDRAWFRAMEBUFFER or new virtual functions that can be called at the appropriate times inside of the pipeline. This will improve the conduit support for everyone and we can dogfood the specific functionality you need while we work out the details.