Draw something over all the layers

Hello,

Here some updates for you.

I finally discovered that the problem I observed was due to an other plug-in of mine.
In detail, there was a class, named CMotion, derived from CRhinoDrawCallback (that is deprecated), and an instance of this class was enabled during the OnOpenDocument and OnNewDocument events, and disabled during the OnCloseDocument event.
Removing the above mentioned enabling call, the my plug-in conduit (the one where I noticed the visualization issue) worked well.

At that point I wasn’t able to find where was the problem in my CMotion implementation but, since CRhinoDrawCallback is deprecated, I reimplemented it deriving it directly from CRhinoDisplayConduit.
Now everything works well, also enabling my CMotion instance in the OnOpenDocument and OnNewDocument events.

I don’t understand where was exactly the issue at the beginning, I haven’t done any changes in my CMotion class implementation aside from deriving it from CRhinoDisplayConduit instead of CRhinoDrawCallback and substituting the DrawMiddleground(CRhinoViewport&, CRhinoDoc&) implementation with the ExecConduit(CRhinoDisplayPipeline&, UINT in_channel, bool&) when channel equal to CsupportChannels::SC_POSTDRAWOBJECTS.

So I went beyond my problem but I’d appreciate if someone could explain where was the problem in deriving from CRhinoDrawCallback.

Thank to everyone for your support,
in special way to @dale.

Magari