mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0024637: Visualization - clean up implementation of rendering in immediate mode
Remove unused flag "DoubleBuf". Remove Visual3d_TransientManager "class" (functionality moved to PrsMgr_PresentationManager). Remove unused "Add" immediate mode. V3d_View class - remove methods ::TransientManagerBeginDraw(), ::TransientManagerClearDraw(), ::TransientManagerBeginAddDraw(). Add method ::RedrawImmediate() to redraw only immediate presentations. OpenGl_GraphicDriver - add methods ::DisplayImmediateStructure(), ::EraseImmediateStructure(), ::RedrawImmediate(). OpenGl_View - manage list of immediate structures. OpenGl_Workspace - automate rendering workflow of immediate + persistent layers. Merge PrsMgr_PresentationManager3d class into PrsMgr_PresentationManager. Mark PrsMgr_PresentationManager3d as alias to PrsMgr_PresentationManager to simplify porting. Prs3d_Presentation - remove unused field myStruct. Prs3d_PresentationShadow - shadow link to existing presentation with custom attributes. Graphic3d_Structure::Highlight() - do not register undisplayed structure in structure manager. AIS_InteractiveContext, AIS_LocalContext add flag to prevent view update into methods ::MoveTo(), ::HilightNextDetected(), ::HilightPreviousDetected() to allow update of customized immediate structures before redraw but after ::MoveTo(). Remove unused method AIS_InteractiveContext::Drag(). StdSelect_ViewerSelector3d do not user immediate mode in methods ::DisplayAreas(), ::ClearAreas(), ::ClearSensitive(), ::DisplaySensitive(), GridEcho - update value in StdSelect_ViewerSelector3d::Pick() instead of V3d_View::Compute(). Do not use global variable for GridEcho vertex. Redraw immediate mode not within GridEcho but at AIS_InteractiveContext, AIS_LocalContext layer. V3d_View::ToPixMap() - disable autoupdate during FitAll. Avoid Redraw() into FBO without ImmediateModeDrawToFront flag. PrsMgr_PresentationManager stores list of temporary immediate presentations, automatically cleared within BeginImmediateMode() call. Methods with ambiguous names have been renamed (new names now consistent with pre-existed method names in AIS_LocalContext class): - BeginDraw -> BeginImmediateDraw - EndDraw -> EndImmediateDraw Remove now useless Remove() method (and ImmediateRemove() in AIS). Visual3d_View now stores map of displayed immediate presentations. ViewerTest_EventManager - eliminate double redraw in selection methods. Fix warning
This commit is contained in:
@@ -135,11 +135,17 @@ class OpenGl_View : public MMgt_TShared
|
||||
//! The structure will be added to associated with it z layer.
|
||||
//! If the z layer is not presented in the view, the structure will
|
||||
//! be displayed in default bottom-level z layer.
|
||||
void DisplayStructure (const OpenGl_Structure *theStructure,
|
||||
void DisplayStructure (const OpenGl_Structure* theStructure,
|
||||
const Standard_Integer thePriority);
|
||||
|
||||
//! Erase structure from display list.
|
||||
void EraseStructure (const OpenGl_Structure *theStructure);
|
||||
void EraseStructure (const OpenGl_Structure* theStructure);
|
||||
|
||||
//! Add structure to the list of immediate structures.
|
||||
void DisplayImmediateStructure (const OpenGl_Structure* theStructure);
|
||||
|
||||
//! Erase structure from display list.
|
||||
void EraseImmediateStructure (const OpenGl_Structure* theStructure);
|
||||
|
||||
//! Insert a new top-level z layer with ID <theLayerId>
|
||||
void AddZLayer (const Standard_Integer theLayerId);
|
||||
@@ -182,16 +188,18 @@ class OpenGl_View : public MMgt_TShared
|
||||
void GetMatrices (TColStd_Array2OfReal& theMatOrient,
|
||||
TColStd_Array2OfReal& theMatMapping) const;
|
||||
|
||||
//! Returns list of immediate structures rendered on top of main presentation
|
||||
const OpenGl_SequenceOfStructure& ImmediateStructures() const
|
||||
{
|
||||
return myImmediateList;
|
||||
}
|
||||
|
||||
#ifdef HAVE_OPENCL
|
||||
//! Returns modification state for ray-tracing.
|
||||
Standard_Size ModificationState() const { return myModificationState; }
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_RTTI(OpenGl_View) // Type definition
|
||||
|
||||
protected:
|
||||
protected:
|
||||
|
||||
void RenderStructs (const Handle(OpenGl_Workspace) &AWorkspace);
|
||||
void RedrawLayer2d (const Handle(OpenGl_PrinterContext)& thePrintContext,
|
||||
@@ -242,7 +250,8 @@ public:
|
||||
|
||||
//View_LABDepthCueing - fixed index used
|
||||
|
||||
OpenGl_LayerList myZLayers;
|
||||
OpenGl_LayerList myZLayers; //!< main list of displayed structure, sorted by layers
|
||||
OpenGl_SequenceOfStructure myImmediateList; //!< list of immediate structures rendered on top of main presentation
|
||||
|
||||
const TEL_TRANSFORM_PERSISTENCE *myTransPers;
|
||||
Standard_Boolean myIsTransPers;
|
||||
@@ -264,8 +273,11 @@ public:
|
||||
Standard_Size myModificationState;
|
||||
#endif
|
||||
|
||||
public:
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
DEFINE_STANDARD_RTTI(OpenGl_View) // Type definition
|
||||
|
||||
};
|
||||
|
||||
#endif //_OpenGl_View_Header
|
||||
#endif // _OpenGl_View_Header
|
||||
|
Reference in New Issue
Block a user