myIsUpdated flag and Invalidate() method removed from OpenGl_Workspace class.
View redrawing is made unconditional.
V3d_View::Update() becomes deprecated and should be replaced with V3d_View::Redraw().
V3d_Viewer::Update() becomes deprecated and equivalent to Redraw()
}
//TsmInitUpdateState
+// Deprecated, need to decide what to do with EraseAnimation() call
void OpenGl_GraphicDriver::InvalidateAllWorkspaces()
{
for (NCollection_DataMap<Standard_Integer, Handle(OpenGl_Workspace)>::Iterator anIt (OpenGl_GraphicDriver::GetMapOfWorkspaces());
anIt.More(); anIt.Next())
{
- anIt.ChangeValue()->Invalidate();
anIt.ChangeValue()->EraseAnimation();
}
}
//! Access the global map of structures.
static NCollection_DataMap<Standard_Integer, OpenGl_Structure*>& GetMapOfStructures();
- //! Invalidates all workspaces - thus they will be redrawn on next update call.
+ //! Deprecated.
static void InvalidateAllWorkspaces();
public:
return;
aCView->View->DisplayStructure (aStructure, thePriority);
- aCView->WS->Invalidate();
}
void OpenGl_GraphicDriver::EraseStructure (const Graphic3d_CView& theCView,
return;
aCView->View->EraseStructure (aStructure);
- aCView->WS->Invalidate();
}
void OpenGl_GraphicDriver::RemoveStructure (const Graphic3d_CStructure& theCStructure)
if (aCView)
{
aCView->WS->SetBackgroundColor(ACView.DefWindow.Background.r,ACView.DefWindow.Background.g,ACView.DefWindow.Background.b);
- aCView->WS->Invalidate();
}
}
if (aCView)
{
aCView->View->SetBackgroundGradient(AColor1,AColor2,AType);
- aCView->WS->Invalidate();
}
}
if (!AWait)
{
aCView->WS->Resize(ACView.DefWindow);
- aCView->WS->Invalidate();
}
}
}
if (!AWait)
{
aCView->WS->Resize(ACView.DefWindow);
- aCView->WS->Invalidate();
}
}
}
if (!AWait)
{
aCView->WS->Resize(ACView.DefWindow);
- aCView->WS->Invalidate();
}
}
}
if (aCView)
{
aCView->View->TriedronDisplay(APosition, AColor, AScale, AsWireframe);
- aCView->WS->Invalidate();
}
}
if (aCView)
{
aCView->View->TriedronErase();
- aCView->WS->Invalidate();
}
}
if (aCView)
{
aCView->View->CreateBackgroundTexture( FileName, FillStyle );
- aCView->WS->Invalidate();
}
}
if (aCView)
{
aCView->View->SetBackgroundTextureStyle( FillStyle );
- aCView->WS->Invalidate();
}
}
if (aCView)
{
aCView->View->SetBackgroundGradientType(FillType);
- aCView->WS->Invalidate();
}
}
if (aCView)
{
aCView->View->GraduatedTrihedronDisplay(cubic);
- aCView->WS->Invalidate();
}
}
if (aCView)
{
aCView->View->GraduatedTrihedronErase();
- aCView->WS->Invalidate();
}
}
const CALL_DEF_WINDOW& theCWindow,
Aspect_RenderingContext theGContext)
: OpenGl_Window (theDisplay, theCWindow, theGContext),
- myIsUpdated (Standard_False),
myTransientList (0),
myIsTransientOpen (Standard_False),
myRetainMode (Standard_False),
{
myUseTransparency = theFlag;
EraseAnimation();
- myIsUpdated = Standard_False;
}
}
const Aspect_CLayer2d& theCUnderLayer,
const Aspect_CLayer2d& theCOverLayer);
- //! Redraw window only if needed.
+ //! Deprecated. Simply calls Redraw().
void Update (const Graphic3d_CView& theCView,
const Aspect_CLayer2d& theCUnderLayer,
const Aspect_CLayer2d& theCOverLayer)
{
- if (!myIsUpdated)
- Redraw (theCView, theCUnderLayer, theCOverLayer);
+ Redraw (theCView, theCUnderLayer, theCOverLayer);
}
//! Special method to perform printing.
void FBORelease (Graphic3d_PtrFrameBuffer theFBOPtr);
Standard_Boolean BufferDump (OpenGl_FrameBuffer *theFBOPtr, Image_CRawBufferData& theBuffer);
- //! Mark this window to be redrawn on next update.
- void Invalidate() { myIsUpdated = Standard_False; }
-
void UseTransparency (const Standard_Boolean theFlag);
Standard_Boolean& UseZBuffer() { return myUseZBuffer; }
Standard_Boolean& UseDepthTest() { return myUseDepthTest; }
protected:
Handle(OpenGl_View) myView; // WSViews - now just one view is supported
- Standard_Boolean myIsUpdated; // WSUpdateState
Tint myTransientList; // WSTransient
Standard_Boolean myIsTransientOpen; // transientOpen
Tint myRetainMode; // WSRetainMode
if( (NamedStatus & OPENGL_NS_ANIMATION) == 0 ) return;
NamedStatus &= ~(OPENGL_NS_ANIMATION | OPENGL_NS_DEGENERATION | OPENGL_NS_UPDATEAM);
- myIsUpdated = Standard_False;
}
/*----------------------------------------------------------------------*/
}
else
glFlush();
-
- myIsUpdated = Standard_True;
}
/*----------------------------------------------------------------------*/
Update ( me ) is redefined static;
---Level: Public
- ---Purpose: Updates the display of the view.
- -- Must be called to update the view
- -- when the update mode is deferred (WAIT) .
+ ---Purpose: Deprecated, Redraw() should be used instead.
Redraw ( me );
---Level: Public
Update (me:mutable ) is redefined static;
---Level: Public
- ---Purpose: Updates the display of all the views of a viewer.
- -- Must be called when the views must be updated
- -- simultaneously while the Update mode is deferred (WAIT).
+ ---Purpose: Deprecated, Redraw() should be used instead.
UpdateLights (me: mutable);
---Level: Public