mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-19 13:40:49 +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:
@@ -172,6 +172,11 @@ is
|
||||
---Purpose: Updates screen in all cases.
|
||||
---Category: Methods to modify the class definition
|
||||
|
||||
RedrawImmediate ( me : mutable )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Updates layer of immediate presentations.
|
||||
|
||||
Redraw ( me : mutable; x,y,width,height: Integer from Standard )
|
||||
is static;
|
||||
---Level: Public
|
||||
@@ -187,6 +192,18 @@ is
|
||||
---Purpose: Updates screen in all cases.
|
||||
---Category: Methods to modify the class definition
|
||||
|
||||
RedrawImmediate ( me : mutable;
|
||||
theUnderLayer : Layer from Visual3d;
|
||||
theOverLayer : Layer from Visual3d )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Updates layer of immediate presentations.
|
||||
|
||||
Invalidate ( me : mutable )
|
||||
is static;
|
||||
---Level: Public
|
||||
---Purpose: Invalidates view content but does not redraw it.
|
||||
|
||||
Redraw ( me : mutable;
|
||||
AnUnderLayer : Layer from Visual3d;
|
||||
AnOverLayer : Layer from Visual3d;
|
||||
@@ -839,6 +856,30 @@ is
|
||||
---Purpose: Display the structure <AStructure> to the view <me>.
|
||||
---Category: Private methods
|
||||
|
||||
DisplayImmediate ( me : mutable;
|
||||
theStructure : Structure from Graphic3d;
|
||||
theIsSingleView : Boolean from Standard = Standard_True)
|
||||
returns Boolean from Standard
|
||||
is static;
|
||||
---Level: Internal
|
||||
---Purpose: Add structure to the list of immediate presentations.
|
||||
-- @return true if structure has not been registered in this view
|
||||
|
||||
EraseImmediate ( me : mutable;
|
||||
theStructure : Structure from Graphic3d )
|
||||
returns Boolean from Standard
|
||||
is static;
|
||||
---Level: Internal
|
||||
---Purpose: Removes the structure from the list of immediate presentations.
|
||||
-- @return true if structure has been registered in view
|
||||
|
||||
ClearImmediate ( me : mutable )
|
||||
returns Boolean from Standard
|
||||
is static;
|
||||
---Level: Internal
|
||||
---Purpose: Clears list of immediate presentations.
|
||||
-- @return true if list was not empty
|
||||
|
||||
Erase ( me : mutable;
|
||||
AStructure : Structure from Graphic3d )
|
||||
is static private;
|
||||
@@ -1138,52 +1179,53 @@ is
|
||||
fields
|
||||
|
||||
--
|
||||
-- Classe : Visual3d_View
|
||||
-- Classe: Visual3d_View
|
||||
--
|
||||
-- Purpose : Declaration of the variables specific to views.
|
||||
-- Purpose: Declaration of the variables specific to views.
|
||||
--
|
||||
-- Reminder : A view is defined by:
|
||||
-- - a ViewManager
|
||||
-- - a ContextView
|
||||
-- Reminder: A view is defined by:
|
||||
-- - a ViewManager
|
||||
-- - a ContextView
|
||||
|
||||
-- the associated C structure
|
||||
MyCView : CView from Graphic3d;
|
||||
-- the associated C structure
|
||||
MyCView : CView from Graphic3d;
|
||||
|
||||
-- the context of the view : Aliasing, Depth-Cueing, Lights ...
|
||||
MyContext : ContextView from Visual3d;
|
||||
-- the context of the view : Aliasing, Depth-Cueing, Lights ...
|
||||
MyContext : ContextView from Visual3d;
|
||||
|
||||
-- the associated window
|
||||
MyWindow : Window from Aspect;
|
||||
-- the associated window
|
||||
MyWindow : Window from Aspect;
|
||||
|
||||
-- association Structure_COMPUTE and Structure_Computed
|
||||
MyTOCOMPUTESequence : SequenceOfStructure from Graphic3d;
|
||||
MyCOMPUTEDSequence : SequenceOfStructure from Graphic3d;
|
||||
-- association Structure_COMPUTE and Structure_Computed
|
||||
MyTOCOMPUTESequence : SequenceOfStructure from Graphic3d;
|
||||
MyCOMPUTEDSequence : SequenceOfStructure from Graphic3d;
|
||||
|
||||
-- the graphic driver used
|
||||
MyGraphicDriver : GraphicDriver from Graphic3d;
|
||||
-- the graphic driver used
|
||||
MyGraphicDriver : GraphicDriver from Graphic3d;
|
||||
|
||||
-- the background of the associated window
|
||||
MyBackground : Background from Aspect;
|
||||
-- the background of the associated window
|
||||
MyBackground : Background from Aspect;
|
||||
|
||||
-- the gradient background of the associated window
|
||||
MyGradientBackground : GradientBackground from Aspect;
|
||||
-- the gradient background of the associated window
|
||||
MyGradientBackground : GradientBackground from Aspect;
|
||||
|
||||
-- the displayed structures in the view
|
||||
MyDisplayedStructure : MapOfStructure from Graphic3d;
|
||||
-- the displayed structures in the view
|
||||
MyDisplayedStructure : MapOfStructure from Graphic3d;
|
||||
|
||||
-- the ViewManager associated with the view
|
||||
-- MyPtrViewManager : Address from Standard;
|
||||
MyPtrViewManager : ViewManagerPtr from Visual3d;
|
||||
myImmediateStructures : MapOfStructure from Graphic3d;
|
||||
|
||||
-- Booleans
|
||||
MyCBitFields : CBitFields8 from Graphic3d;
|
||||
-- the ViewManager associated with the view
|
||||
MyPtrViewManager : ViewManagerPtr from Visual3d;
|
||||
|
||||
MyGTrihedron : CGraduatedTrihedron from Graphic3d;
|
||||
-- Booleans
|
||||
MyCBitFields : CBitFields8 from Graphic3d;
|
||||
|
||||
myDefaultCamera : Camera_Handle from Graphic3d;
|
||||
MyGTrihedron : CGraduatedTrihedron from Graphic3d;
|
||||
|
||||
myDefaultCamera : Camera_Handle from Graphic3d;
|
||||
|
||||
friends
|
||||
|
||||
class ViewManager from Visual3d
|
||||
class ViewManager from Visual3d
|
||||
|
||||
end View;
|
||||
|
Reference in New Issue
Block a user