From 0b48d1fa365e1fc37bb6f9dcb498539e558643d5 Mon Sep 17 00:00:00 2001 From: kgv Date: Thu, 2 Dec 2021 17:02:47 +0300 Subject: [PATCH] 0032708: Visualization, V3d_View::SetImmediateUpdate() - deprecate and disable by default implicit View redraws --- dox/upgrade/upgrade.md | 7 ++++ samples/glfw/GlfwOcctView.cpp | 1 - .../app/src/main/jni/OcctJni_Viewer.cxx | 1 - .../09_Animation/src/AnimationView3D.cpp | 1 - samples/mfc/standard/Common/OCC_BaseView.cpp | 1 - samples/qt/AndroidQt/src/AndroidQt.cxx | 1 - samples/webgl/WasmOcctView.cpp | 1 - src/AIS/AIS_AnimationCamera.cxx | 8 +++- src/AIS/AIS_ViewController.cxx | 4 ++ src/AIS/AIS_ViewCube.cxx | 6 +++ src/V3d/V3d_View.cxx | 40 ++++++++++--------- src/V3d/V3d_View.hxx | 7 ++-- src/V3d/V3d_Viewer.cxx | 2 + src/ViewerTest/ViewerTest.cxx | 4 ++ src/ViewerTest/ViewerTest_AutoUpdater.cxx | 13 +++--- src/ViewerTest/ViewerTest_OpenGlCommands.cxx | 4 ++ src/ViewerTest/ViewerTest_ViewerCommands.cxx | 9 ++++- 17 files changed, 74 insertions(+), 36 deletions(-) diff --git a/dox/upgrade/upgrade.md b/dox/upgrade/upgrade.md index 6e4a60b47e..7c26168e90 100644 --- a/dox/upgrade/upgrade.md +++ b/dox/upgrade/upgrade.md @@ -2318,3 +2318,10 @@ aValidateEdge.Process(); `Prs3d_Drawer` getters no more implicitly create "default" aspects. If specific property has not been set before to this drawer instance nor to linked drawer instance, then NULL property will be returned. Make sure to set property beforehand or to call `SetOwn*` / `SetupOwn*` methods to derive from defaults. + +@subsection upgrade_occt770_view_immupdate V3d_View implicit updates + +`V3d_View::SetImmediateUpdate()` flag has been deprecated and is now disabled by default. +So that methods like `V3d_View::Rotation()` or `V3d_View::Panning()` will no more automatically redraw View contents. +Application relying on previous behavior still may use `V3d_View::SetImmediateUpdate()` to turn back implicit updates, +but encouraged to update their code and put explicit `V3d_View::Redraw()` where necessary, as this functionality will be removed in future. diff --git a/samples/glfw/GlfwOcctView.cpp b/samples/glfw/GlfwOcctView.cpp index 36108497bf..9c8bf3367a 100644 --- a/samples/glfw/GlfwOcctView.cpp +++ b/samples/glfw/GlfwOcctView.cpp @@ -175,7 +175,6 @@ void GlfwOcctView::initViewer() aViewer->SetDefaultTypeOfView (V3d_PERSPECTIVE); aViewer->ActivateGrid (Aspect_GT_Rectangular, Aspect_GDM_Lines); myView = aViewer->CreateView(); - myView->SetImmediateUpdate (false); myView->SetWindow (myOcctWindow, myOcctWindow->NativeGlContext()); myView->ChangeRenderingParams().ToShowStats = true; myContext = new AIS_InteractiveContext (aViewer); diff --git a/samples/java/jniviewer/app/src/main/jni/OcctJni_Viewer.cxx b/samples/java/jniviewer/app/src/main/jni/OcctJni_Viewer.cxx index 14a05680ba..f7455e3555 100644 --- a/samples/java/jniviewer/app/src/main/jni/OcctJni_Viewer.cxx +++ b/samples/java/jniviewer/app/src/main/jni/OcctJni_Viewer.cxx @@ -259,7 +259,6 @@ bool OcctJni_Viewer::init() Handle(Aspect_NeutralWindow) aWindow = new Aspect_NeutralWindow(); aWindow->SetSize (aWidth, aHeight); myView = myViewer->CreateView(); - myView->SetImmediateUpdate (false); myView->ChangeRenderingParams().Resolution = (unsigned int )(96.0 * myDevicePixelRatio + 0.5); myView->ChangeRenderingParams().ToShowStats = true; myView->ChangeRenderingParams().CollectedStats = (Graphic3d_RenderingParams::PerfCounters ) (Graphic3d_RenderingParams::PerfCounters_FrameRate | Graphic3d_RenderingParams::PerfCounters_Triangles); diff --git a/samples/mfc/standard/09_Animation/src/AnimationView3D.cpp b/samples/mfc/standard/09_Animation/src/AnimationView3D.cpp index 1cc55b62e7..7559c34830 100755 --- a/samples/mfc/standard/09_Animation/src/AnimationView3D.cpp +++ b/samples/mfc/standard/09_Animation/src/AnimationView3D.cpp @@ -171,7 +171,6 @@ void CAnimationView3D::OnInitialUpdate() aViewer->SetDefaultTypeOfView (V3d_PERSPECTIVE); myView = aViewer->CreateView(); - myView->SetImmediateUpdate (false); // store for restore state after rotation (witch is in Degenerated mode) myHlrModeIsOn = myView->ComputedMode(); diff --git a/samples/mfc/standard/Common/OCC_BaseView.cpp b/samples/mfc/standard/Common/OCC_BaseView.cpp index a8531b7291..b29604a6bf 100755 --- a/samples/mfc/standard/Common/OCC_BaseView.cpp +++ b/samples/mfc/standard/Common/OCC_BaseView.cpp @@ -87,7 +87,6 @@ void OCC_BaseView::OnInitialUpdate() } myView = GetAISContext()->CurrentViewer()->CreateView(); - myView->SetImmediateUpdate (false); myView->SetComputedMode (Standard_False); Handle(OpenGl_GraphicDriver) aDriver = Handle(OpenGl_GraphicDriver)::DownCast (myView->Viewer()->Driver()); diff --git a/samples/qt/AndroidQt/src/AndroidQt.cxx b/samples/qt/AndroidQt/src/AndroidQt.cxx index c73d00a5ef..505034f604 100644 --- a/samples/qt/AndroidQt/src/AndroidQt.cxx +++ b/samples/qt/AndroidQt/src/AndroidQt.cxx @@ -348,7 +348,6 @@ bool AndroidQt::initViewer (Aspect_Drawable theWin) #endif myView = myViewer->CreateView(); - myView->SetImmediateUpdate (Standard_False); #ifdef __ANDROID__ myView->SetWindow (aWindow, (Aspect_RenderingContext )anEglContext); diff --git a/samples/webgl/WasmOcctView.cpp b/samples/webgl/WasmOcctView.cpp index 53e0096030..ab64b49a76 100644 --- a/samples/webgl/WasmOcctView.cpp +++ b/samples/webgl/WasmOcctView.cpp @@ -342,7 +342,6 @@ bool WasmOcctView::initViewer() myView = new V3d_View (aViewer); myView->Camera()->SetProjectionType (Graphic3d_Camera::Projection_Perspective); - myView->SetImmediateUpdate (false); myView->ChangeRenderingParams().IsShadowEnabled = false; myView->ChangeRenderingParams().Resolution = (unsigned int )(96.0 * myDevicePixelRatio + 0.5); myView->ChangeRenderingParams().ToShowStats = true; diff --git a/src/AIS/AIS_AnimationCamera.cxx b/src/AIS/AIS_AnimationCamera.cxx index 8ca5e2ea36..d699a738af 100644 --- a/src/AIS/AIS_AnimationCamera.cxx +++ b/src/AIS/AIS_AnimationCamera.cxx @@ -50,8 +50,14 @@ void AIS_AnimationCamera::update (const AIS_AnimationProgress& theProgress) Graphic3d_CameraLerp aCamLerp (myCamStart, myCamEnd); aCamLerp.Interpolate (HasOwnDuration() ? theProgress.LocalNormalized : 1.0, aCamera); +Standard_DISABLE_DEPRECATION_WARNINGS const Standard_Boolean aPrevImmUpdate = myView->SetImmediateUpdate (Standard_False); +Standard_ENABLE_DEPRECATION_WARNINGS + myView->SetCamera (aCamera); - myView->SetImmediateUpdate (aPrevImmUpdate); myView->Invalidate(); + +Standard_DISABLE_DEPRECATION_WARNINGS + myView->SetImmediateUpdate (aPrevImmUpdate); +Standard_ENABLE_DEPRECATION_WARNINGS } diff --git a/src/AIS/AIS_ViewController.cxx b/src/AIS/AIS_ViewController.cxx index 2d08659425..3a5c590531 100644 --- a/src/AIS/AIS_ViewController.cxx +++ b/src/AIS/AIS_ViewController.cxx @@ -3239,7 +3239,9 @@ void AIS_ViewController::handleXRPresentations (const Handle(AIS_InteractiveCont void AIS_ViewController::HandleViewEvents (const Handle(AIS_InteractiveContext)& theCtx, const Handle(V3d_View)& theView) { +Standard_DISABLE_DEPRECATION_WARNINGS const bool wasImmediateUpdate = theView->SetImmediateUpdate (false); +Standard_ENABLE_DEPRECATION_WARNINGS handleViewOrientationKeys (theCtx, theView); const AIS_WalkDelta aWalk = handleNavigationKeys (theCtx, theView); @@ -3256,7 +3258,9 @@ void AIS_ViewController::HandleViewEvents (const Handle(AIS_InteractiveContext)& handleViewRedraw (theCtx, theView); theView->View()->UnsetXRPosedCamera(); +Standard_DISABLE_DEPRECATION_WARNINGS theView->SetImmediateUpdate (wasImmediateUpdate); +Standard_ENABLE_DEPRECATION_WARNINGS // make sure to not process the same events twice myGL.Reset(); diff --git a/src/AIS/AIS_ViewCube.cxx b/src/AIS/AIS_ViewCube.cxx index 1e405cb44f..656e5b2dc5 100644 --- a/src/AIS/AIS_ViewCube.cxx +++ b/src/AIS/AIS_ViewCube.cxx @@ -892,11 +892,17 @@ void AIS_ViewCube::StartAnimation (const Handle(AIS_ViewCubeOwner)& theOwner) { { Handle(Graphic3d_Camera) aBackupCamera = aView->Camera(); + Standard_DISABLE_DEPRECATION_WARNINGS const bool wasImmediateUpdate = aView->SetImmediateUpdate (false); + Standard_ENABLE_DEPRECATION_WARNINGS + aView->SetCamera (myEndState); aView->SetProj (theOwner->MainOrientation(), myIsYup); aView->SetCamera (aBackupCamera); + + Standard_DISABLE_DEPRECATION_WARNINGS aView->SetImmediateUpdate (wasImmediateUpdate); + Standard_ENABLE_DEPRECATION_WARNINGS } const gp_Dir aNewDir = myEndState->Direction(); diff --git a/src/V3d/V3d_View.cxx b/src/V3d/V3d_View.cxx index c5e768b3df..1485f3968a 100644 --- a/src/V3d/V3d_View.cxx +++ b/src/V3d/V3d_View.cxx @@ -66,7 +66,8 @@ namespace //purpose : //============================================================================= V3d_View::V3d_View (const Handle(V3d_Viewer)& theViewer, const V3d_TypeOfView theType) -: myIsInvalidatedImmediate (Standard_True), +: myImmediateUpdate (Standard_False), + myIsInvalidatedImmediate (Standard_True), MyViewer (theViewer.operator->()), SwitchSetFront (Standard_False), myZRotation (Standard_False), @@ -90,7 +91,6 @@ V3d_View::V3d_View (const Handle(V3d_Viewer)& theViewer, const V3d_TypeOfView th myDefaultCamera = new Graphic3d_Camera(); - myImmediateUpdate = Standard_False; SetAutoZFitMode (Standard_True, 1.0); SetBackFacingModel (V3d_TOBM_AUTOMATIC); SetCamera (aCamera); @@ -107,7 +107,6 @@ V3d_View::V3d_View (const Handle(V3d_Viewer)& theViewer, const V3d_TypeOfView th SetViewOrientationDefault(); theViewer->AddView (this); Init(); - myImmediateUpdate = Standard_True; } //============================================================================= @@ -115,7 +114,8 @@ V3d_View::V3d_View (const Handle(V3d_Viewer)& theViewer, const V3d_TypeOfView th //purpose : //============================================================================= V3d_View::V3d_View (const Handle(V3d_Viewer)& theViewer, const Handle(V3d_View)& theView) -: myIsInvalidatedImmediate (Standard_True), +: myImmediateUpdate (Standard_False), + myIsInvalidatedImmediate (Standard_True), MyViewer (theViewer.operator->()), SwitchSetFront(Standard_False), myZRotation (Standard_False), @@ -129,11 +129,9 @@ V3d_View::V3d_View (const Handle(V3d_Viewer)& theViewer, const Handle(V3d_View)& myDefaultCamera = new Graphic3d_Camera (theView->DefaultCamera()); - myImmediateUpdate = Standard_False; SetAutoZFitMode (theView->AutoZFitMode(), theView->AutoZFitScaleFactor()); theViewer->AddView (this); Init(); - myImmediateUpdate = Standard_True; } //============================================================================= @@ -990,7 +988,8 @@ void V3d_View::SetEye(const Standard_Real X,const Standard_Real Y,const Standard { Standard_Real aTwistBefore = Twist(); - Standard_Boolean wasUpdateEnabled = SetImmediateUpdate (Standard_False); + const Standard_Boolean wasUpdateEnabled = myImmediateUpdate; + myImmediateUpdate = Standard_False; Handle(Graphic3d_Camera) aCamera = Camera(); @@ -998,7 +997,7 @@ void V3d_View::SetEye(const Standard_Real X,const Standard_Real Y,const Standard SetTwist (aTwistBefore); - SetImmediateUpdate (wasUpdateEnabled); + myImmediateUpdate = wasUpdateEnabled; ImmediateUpdate(); } @@ -1042,13 +1041,14 @@ void V3d_View::SetProj( const Standard_Real Vx,const Standard_Real Vy, const Sta Standard_Real aTwistBefore = Twist(); - Standard_Boolean wasUpdateEnabled = SetImmediateUpdate (Standard_False); + const Standard_Boolean wasUpdateEnabled = myImmediateUpdate; + myImmediateUpdate = Standard_False; Camera()->SetDirection (gp_Dir (Vx, Vy, Vz).Reversed()); SetTwist(aTwistBefore); - SetImmediateUpdate (wasUpdateEnabled); + myImmediateUpdate = wasUpdateEnabled; ImmediateUpdate(); } @@ -1107,13 +1107,14 @@ void V3d_View::SetAt(const Standard_Real X,const Standard_Real Y,const Standard_ { Standard_Real aTwistBefore = Twist(); - Standard_Boolean wasUpdateEnabled = SetImmediateUpdate (Standard_False); + const Standard_Boolean wasUpdateEnabled = myImmediateUpdate; + myImmediateUpdate = Standard_False; Camera()->SetCenter (gp_Pnt (X, Y, Z)); SetTwist (aTwistBefore); - SetImmediateUpdate (wasUpdateEnabled); + myImmediateUpdate = wasUpdateEnabled; ImmediateUpdate(); } @@ -1513,7 +1514,8 @@ void V3d_View::WindowFit (const Standard_Integer theMinXp, const Standard_Integer theMaxXp, const Standard_Integer theMaxYp) { - Standard_Boolean wasUpdateEnabled = SetImmediateUpdate (Standard_False); + const Standard_Boolean wasUpdateEnabled = myImmediateUpdate; + myImmediateUpdate = Standard_False; Handle(Graphic3d_Camera) aCamera = Camera(); @@ -1559,7 +1561,7 @@ void V3d_View::WindowFit (const Standard_Integer theMinXp, FitAll (aX1, aY1, aX2, aY2); } - SetImmediateUpdate (wasUpdateEnabled); + myImmediateUpdate = wasUpdateEnabled; ImmediateUpdate(); } @@ -2363,7 +2365,8 @@ void V3d_View::Panning (const Standard_Real theDXv, myCamStartOpCenter = aCamera->Center(); } - Standard_Boolean wasUpdateEnabled = SetImmediateUpdate (Standard_False); + const Standard_Boolean wasUpdateEnabled = myImmediateUpdate; + myImmediateUpdate = Standard_False; gp_Pnt aViewDims = aCamera->ViewDimensions(); @@ -2372,7 +2375,7 @@ void V3d_View::Panning (const Standard_Real theDXv, Translate (aCamera, -theDXv, -theDYv); Scale (aCamera, aViewDims.X() / theZoomFactor, aViewDims.Y() / theZoomFactor); - SetImmediateUpdate (wasUpdateEnabled); + myImmediateUpdate = wasUpdateEnabled; ImmediateUpdate(); } @@ -2416,7 +2419,8 @@ void V3d_View::ZoomAtPoint (const Standard_Integer theMouseStartX, const Standard_Integer theMouseEndX, const Standard_Integer theMouseEndY) { - Standard_Boolean wasUpdateEnabled = SetImmediateUpdate (Standard_False); + const Standard_Boolean wasUpdateEnabled = myImmediateUpdate; + myImmediateUpdate = Standard_False; // zoom Standard_Real aDxy = Standard_Real ((theMouseEndX + theMouseEndY) - (theMouseStartX + theMouseStartY)); @@ -2459,7 +2463,7 @@ void V3d_View::ZoomAtPoint (const Standard_Integer theMouseStartX, aCamera->SetScale (aCamera->Scale() / aCoef); Translate (aCamera, aZoomAtPointXv - aDxv, aZoomAtPointYv - aDyv); - SetImmediateUpdate (wasUpdateEnabled); + myImmediateUpdate = wasUpdateEnabled; ImmediateUpdate(); } diff --git a/src/V3d/V3d_View.hxx b/src/V3d/V3d_View.hxx index 222fb18ef0..136ffa91e2 100644 --- a/src/V3d/V3d_View.hxx +++ b/src/V3d/V3d_View.hxx @@ -265,9 +265,6 @@ public: //! Returns TRUE when the light is active in this view. Standard_EXPORT Standard_Boolean IsActiveLight (const Handle(V3d_Light)& theLight) const; - //! sets the immediate update mode and returns the previous one. - Standard_EXPORT Standard_Boolean SetImmediateUpdate (const Standard_Boolean theImmediateUpdate); - //! Returns trihedron object. const Handle(V3d_Trihedron)& Trihedron (bool theToCreate = true) { @@ -948,6 +945,10 @@ public: public: //! @name deprecated methods + //! sets the immediate update mode and returns the previous one. + Standard_DEPRECATED ("Deprecated method - ImmediateUpdate will be removed") + Standard_EXPORT Standard_Boolean SetImmediateUpdate (const Standard_Boolean theImmediateUpdate); + //! Returns True if One light more can be //! activated in this View. Standard_DEPRECATED ("Deprecated method - ActiveLights() should be used instead") diff --git a/src/V3d/V3d_Viewer.cxx b/src/V3d/V3d_Viewer.cxx index ad6467fab4..f6e20e1179 100644 --- a/src/V3d/V3d_Viewer.cxx +++ b/src/V3d/V3d_Viewer.cxx @@ -116,11 +116,13 @@ void V3d_Viewer::SetViewOn (const Handle(V3d_View)& theView) theView->SetGrid (myPrivilegedPlane, aGrid); theView->SetGridActivity (aGrid->IsActive()); } +Standard_DISABLE_DEPRECATION_WARNINGS if (theView->SetImmediateUpdate (Standard_False)) { theView->Redraw(); theView->SetImmediateUpdate (Standard_True); } +Standard_ENABLE_DEPRECATION_WARNINGS } // ======================================================================== diff --git a/src/ViewerTest/ViewerTest.cxx b/src/ViewerTest/ViewerTest.cxx index acfb950601..7494d69713 100644 --- a/src/ViewerTest/ViewerTest.cxx +++ b/src/ViewerTest/ViewerTest.cxx @@ -1199,7 +1199,9 @@ static Standard_Integer VDump (Draw_Interpretor& theDI, case Graphic3d_BT_Red: aFormat = Image_Format_Gray; break; } +Standard_DISABLE_DEPRECATION_WARNINGS const bool wasImmUpdate = aView->SetImmediateUpdate (false); +Standard_ENABLE_DEPRECATION_WARNINGS Handle(Graphic3d_Camera) aCamBack = aView->Camera(); if (!aCustomCam.IsNull()) { @@ -1277,7 +1279,9 @@ static Standard_Integer VDump (Draw_Interpretor& theDI, { aView->SetCamera (aCamBack); } +Standard_DISABLE_DEPRECATION_WARNINGS aView->SetImmediateUpdate (wasImmUpdate); +Standard_ENABLE_DEPRECATION_WARNINGS if (!aPixMap.Save (aFilePath)) { diff --git a/src/ViewerTest/ViewerTest_AutoUpdater.cxx b/src/ViewerTest/ViewerTest_AutoUpdater.cxx index 61f45871fa..25b3e7d2cd 100644 --- a/src/ViewerTest/ViewerTest_AutoUpdater.cxx +++ b/src/ViewerTest/ViewerTest_AutoUpdater.cxx @@ -28,7 +28,9 @@ ViewerTest_AutoUpdater::ViewerTest_AutoUpdater (const Handle(AIS_InteractiveCont { if (!theView.IsNull()) { + Standard_DISABLE_DEPRECATION_WARNINGS myWasAutoUpdate = theView->SetImmediateUpdate (Standard_False); + Standard_ENABLE_DEPRECATION_WARNINGS } } @@ -74,7 +76,9 @@ void ViewerTest_AutoUpdater::Invalidate() if (myWasAutoUpdate && !myView.IsNull()) { + Standard_DISABLE_DEPRECATION_WARNINGS myView->SetImmediateUpdate (myWasAutoUpdate); + Standard_ENABLE_DEPRECATION_WARNINGS } } @@ -86,7 +90,9 @@ void ViewerTest_AutoUpdater::Update() { if (!myView.IsNull()) { + Standard_DISABLE_DEPRECATION_WARNINGS myView->SetImmediateUpdate (myWasAutoUpdate); + Standard_ENABLE_DEPRECATION_WARNINGS } switch (myToUpdate) @@ -96,13 +102,6 @@ void ViewerTest_AutoUpdater::Update() return; } case ViewerTest_AutoUpdater::RedrawMode_Auto: - { - if (!myWasAutoUpdate) - { - return; - } - } - Standard_FALLTHROUGH case ViewerTest_AutoUpdater::RedrawMode_Forced: { if (!myContext.IsNull()) diff --git a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx index 7f4af79439..e728302d66 100644 --- a/src/ViewerTest/ViewerTest_OpenGlCommands.cxx +++ b/src/ViewerTest/ViewerTest_OpenGlCommands.cxx @@ -925,7 +925,9 @@ static Standard_Integer VListColors (Draw_Interpretor& theDI, { ViewerTest::ViewerInit (0, 0, anImgParams.Width, anImgParams.Height, "TmpDriver/TmpViewer/TmpView"); aView = ViewerTest::CurrentView(); + Standard_DISABLE_DEPRECATION_WARNINGS aView->SetImmediateUpdate (false); + Standard_ENABLE_DEPRECATION_WARNINGS aView->SetBgGradientStyle (Aspect_GradientFillMethod_None, false); } @@ -964,7 +966,9 @@ static Standard_Integer VListColors (Draw_Interpretor& theDI, const TCollection_AsciiString anImgPath = aFileNameBase + "_" + aColName + ".png"; if (!aView.IsNull()) { + Standard_DISABLE_DEPRECATION_WARNINGS aView->SetImmediateUpdate (false); + Standard_ENABLE_DEPRECATION_WARNINGS aView->SetBackgroundColor (aCol); if (!aView->ToPixMap (anImg, anImgParams) || !anImg.Save (aFolder + anImgPath)) diff --git a/src/ViewerTest/ViewerTest_ViewerCommands.cxx b/src/ViewerTest/ViewerTest_ViewerCommands.cxx index 9c5194ac71..d0b30ce3d2 100644 --- a/src/ViewerTest/ViewerTest_ViewerCommands.cxx +++ b/src/ViewerTest/ViewerTest_ViewerCommands.cxx @@ -7645,7 +7645,9 @@ static Standard_Integer VAnimation (Draw_Interpretor& theDI, } // Perform video recording +Standard_DISABLE_DEPRECATION_WARNINGS const Standard_Boolean wasImmediateUpdate = aView->SetImmediateUpdate (Standard_False); +Standard_ENABLE_DEPRECATION_WARNINGS const Standard_Real anUpperPts = aPlayStartTime + aPlayDuration; anAnimation->StartTimer (aPlayStartTime, aPlaySpeed, Standard_True, aPlayDuration <= 0.0); @@ -7736,7 +7738,9 @@ static Standard_Integer VAnimation (Draw_Interpretor& theDI, << "Nb. Frames: " << Standard_Real(aNbFrames); aView->Redraw(); +Standard_DISABLE_DEPRECATION_WARNINGS aView->SetImmediateUpdate (wasImmediateUpdate); +Standard_ENABLE_DEPRECATION_WARNINGS return 0; } @@ -13159,7 +13163,9 @@ static int VDumpSelectionImage (Draw_Interpretor& /*theDi*/, return 1; } +Standard_DISABLE_DEPRECATION_WARNINGS const bool wasImmUpdate = aView->SetImmediateUpdate (false); +Standard_ENABLE_DEPRECATION_WARNINGS Handle(Graphic3d_Camera) aCamBack = aView->Camera(); if (!aCustomCam.IsNull()) { @@ -13174,8 +13180,9 @@ static int VDumpSelectionImage (Draw_Interpretor& /*theDi*/, { aView->SetCamera (aCamBack); } +Standard_DISABLE_DEPRECATION_WARNINGS aView->SetImmediateUpdate (wasImmUpdate); - +Standard_ENABLE_DEPRECATION_WARNINGS if (!aPixMap.Save (aFile)) { Message::SendFail ("Error: can't save selection image");