in PrsMgr_PresentationManager.hxx, can we change the calls from V3d_Viewer to NCollection_List<Handle(OpenGl_View)>

it is about developing. In PrsMgr_PresentationManager.hxx file, there are calls to V3d_Viewer. it means a low level framework calls a high level framework.

It makes if you want to to develop something not invlved in AIS or V3d but with SelectMgr_SelectableObject become impossible.

My question is that can we change it to call NCollection_List<Handle(OpenGl_View)>& theViews then we can get rid of high level call from low level.function.

```c++

//! Allows rapid drawing of the each view in theViewer by avoiding an update of the whole background. Standard_EXPORT void EndImmediateDraw (const Handle(V3d_Viewer)& theViewer);

//! Clears and redisplays immediate structures of the viewer taking into account its affinity. Standard_EXPORT void RedrawImmediate (const Handle(V3d_Viewer)& theViewer);

//! Handles the structures from and displays it separating view-dependent structures and taking into account //! structure visibility by setting proper affinity. void displayImmediate (const Handle(V3d_Viewer)& theViewer);


///////////change to OpenGl_View//////////////////////// ```c++ //! Allows rapid drawing of the each view in theViewer by avoiding an update of the whole background. Standard_EXPORT void EndImmediateDraw (NCollection_List<Handle(OpenGl_View)>& theViews); //! Clears and redisplays immediate structures of the viewer taking into account its affinity. Standard_EXPORT void RedrawImmediate (NCollection_List<Handle(OpenGl_View)>& theViews); //! Handles the structures from <myImmediateList> and displays it separating view-dependent structures and taking into account //! structure visibility by setting proper affinity. void displayImmediate ( NCollection_List<Handle(OpenGl_View)>& theViews);
gkv311 n's picture

I don't quite understand which problem you are trying to solve. PrsMgr depends on V3d, V3d doesn't depend on PrsMgr (hence, there is no cyclic dependency here) and both belong to the same toolkit TKV3d (although there was an idea #0031429 to move both to TKGraphic3d or to TKService).

Can we change here to OpenGl_View? Certainly we can't, as this would imply direct dependency from TKOpenGl, which is only one of possible implementations of Graphic3d_GraphicDriver interface.

Can we change here to Graphic3d_CView? Yes, it should be possible, although this would require some efforts for passing the list of Graphic3d_CView, which we currently don't have (as it is stored as a list of V3d_View, each holding Graphic3d_CView.

haidong ma's picture

"although there was an idea #0031429 to move both to TKGraphic3d or to TKService)"

This is exactly I want. For web application don't want to involve TKV3D, Even if we don't involve AIS.