]> OCCT Git - occt-copy.git/commitdiff
0030434: Visualization, TKV3d - add "NoUpdate" state of frustum culling optimization
authorosa <osa@opencascade.com>
Wed, 9 Jan 2019 14:01:18 +0000 (17:01 +0300)
committerbugmaster <bugmaster@opencascade.com>
Fri, 11 Jan 2019 15:57:52 +0000 (18:57 +0300)
Frustum culling is now managed by Graphic3d_RenderingParams::FrustumCullingState flag
and can be switched into Graphic3d_RenderingParams::FrustumCulling_NoUpdate state
useful for debugging the algorithm.

Draw Harness command vrustumculling has been replaced by vrenderparams -frustumCulling.

19 files changed:
src/Graphic3d/Graphic3d_CView.cxx
src/Graphic3d/Graphic3d_CView.hxx
src/Graphic3d/Graphic3d_RenderingParams.hxx
src/OpenGl/OpenGl_Layer.cxx
src/OpenGl/OpenGl_Layer.hxx
src/OpenGl/OpenGl_LayerList.cxx
src/OpenGl/OpenGl_View.cxx
src/OpenGl/OpenGl_View.hxx
src/OpenGl/OpenGl_Workspace.cxx
src/V3d/V3d_View.cxx
src/V3d/V3d_View.hxx
src/ViewerTest/ViewerTest_ViewerCommands.cxx
tests/bugs/vis/bug24307_1
tests/bugs/vis/bug24307_2
tests/bugs/vis/bug25400
tests/bugs/vis/bug25679
tests/bugs/vis/bug25760_1
tests/bugs/vis/bug25760_2
tests/bugs/vis/bug30434 [new file with mode: 0644]

index a8ff322758f05cb63dc452447dc6b356f31ffd28..e88505feb44853cbadeafd96893cb3006e1cf12e 100644 (file)
@@ -1082,7 +1082,6 @@ void Graphic3d_CView::CopySettings (const Handle(Graphic3d_CView)& theOther)
   SetBackgroundImage       (theOther->BackgroundImage());
   SetBackgroundImageStyle  (theOther->BackgroundImageStyle());
   SetTextureEnv            (theOther->TextureEnv());
-  SetCullingEnabled        (theOther->IsCullingEnabled());
   SetShadingModel          (theOther->ShadingModel());
   SetBackfacingModel       (theOther->BackfacingModel());
   SetCamera                (new Graphic3d_Camera (theOther->Camera()));
index bc802d051c48921a5e62e29f0a206b19fabb1382..1a2eda6fe8b3c31d9d37be807a28c67338fbbfe6 100644 (file)
@@ -381,12 +381,6 @@ public:
   //! Sets environment texture for the view.
   virtual void SetTextureEnv (const Handle(Graphic3d_TextureEnv)& theTextureEnv) = 0;
 
-  //! Returns the state of frustum culling optimization.
-  virtual Standard_Boolean IsCullingEnabled() const = 0;
-
-  //! Enables or disables frustum culling optimization.
-  virtual void SetCullingEnabled (const Standard_Boolean theIsEnabled) = 0;
-
   //! Return backfacing model used for the view.
   virtual Graphic3d_TypeOfBackfacingModel BackfacingModel() const = 0;
 
index 001cef24bc91e662e5ae4db75a033079176e4b8a..cbb8c822edcb3e41db90a52cca9681f928d895a4 100644 (file)
@@ -80,6 +80,14 @@ public:
                      | PerfCounters_FrameTimeMax,
   };
 
+  //! State of frustum culling optimization.
+  enum FrustumCulling
+  {
+    FrustumCulling_Off,     //!< culling is disabled
+    FrustumCulling_On,      //!< culling is active, and the list of culled entities is automatically updated before redraw
+    FrustumCulling_NoUpdate //!< culling is active, but the list of culled entities is not updated
+  };
+
 public:
 
   //! Creates default rendering parameters.
@@ -108,6 +116,7 @@ public:
     NbRayTracingTiles           (16 * 16),
     CameraApertureRadius        (0.0f),
     CameraFocalPlaneDist        (1.0f),
+    FrustumCullingState         (FrustumCulling_On),
     ToneMappingMethod           (Graphic3d_ToneMappingMethod_Disabled),
     Exposure                    (0.f),
     WhitePoint                  (1.f),
@@ -181,6 +190,7 @@ public:
   Standard_Integer                  NbRayTracingTiles;           //!< total number of screen tiles used in adaptive sampling mode (PT only)
   Standard_ShortReal                CameraApertureRadius;        //!< aperture radius of perspective camera used for depth-of-field, 0.0 by default (no DOF) (path tracing only)
   Standard_ShortReal                CameraFocalPlaneDist;        //!< focal  distance of perspective camera used for depth-of field, 1.0 by default (path tracing only)
+  FrustumCulling                    FrustumCullingState;         //!< state of frustum culling optimization; FrustumCulling_On by default
 
   Graphic3d_ToneMappingMethod       ToneMappingMethod;           //!< specifies tone mapping method for path tracing, Graphic3d_ToneMappingMethod_Disabled by default
   Standard_ShortReal                Exposure;                    //!< exposure value used for tone mapping (path tracing), 0.0 by default
index 120bbef95169f3600f6c6664ee81f070688f7a04..53d0b5cea6837c031261a83b32c441e5c03b5e79 100644 (file)
@@ -485,23 +485,28 @@ void OpenGl_Layer::updateBVH() const
 // =======================================================================
 void OpenGl_Layer::UpdateCulling (const Standard_Integer theViewId,
                                   const OpenGl_BVHTreeSelector& theSelector,
-                                  const Standard_Boolean theToTraverse)
+                                  const Graphic3d_RenderingParams::FrustumCulling theFrustumCullingState)
 {
   updateBVH();
 
   myNbStructuresNotCulled = myNbStructures;
-  for (OpenGl_IndexedMapOfStructure::Iterator aStructIter (myBVHPrimitives.Structures()); aStructIter.More(); aStructIter.Next())
+  if (theFrustumCullingState != Graphic3d_RenderingParams::FrustumCulling_NoUpdate)
   {
-    const OpenGl_Structure* aStruct = aStructIter.Value();
-    aStruct->SetCulled (theToTraverse);
-  }
-  for (OpenGl_IndexedMapOfStructure::Iterator aStructIter (myBVHPrimitivesTrsfPers.Structures()); aStructIter.More(); aStructIter.Next())
-  {
-    const OpenGl_Structure* aStruct = aStructIter.Value();
-    aStruct->SetCulled (theToTraverse);
+    Standard_Boolean toTraverse =
+      (theFrustumCullingState == Graphic3d_RenderingParams::FrustumCulling_On);
+    for (OpenGl_IndexedMapOfStructure::Iterator aStructIter (myBVHPrimitives.Structures()); aStructIter.More(); aStructIter.Next())
+    {
+      const OpenGl_Structure* aStruct = aStructIter.Value();
+      aStruct->SetCulled (toTraverse);
+    }
+    for (OpenGl_IndexedMapOfStructure::Iterator aStructIter (myBVHPrimitivesTrsfPers.Structures()); aStructIter.More(); aStructIter.Next())
+    {
+      const OpenGl_Structure* aStruct = aStructIter.Value();
+      aStruct->SetCulled (toTraverse);
+    }
   }
 
-  if (!theToTraverse)
+  if (theFrustumCullingState != Graphic3d_RenderingParams::FrustumCulling_On)
   {
     return;
   }
index 613e46d776802150f9a0bce048d6269b64faeb7f..8fe3f46ec63f77cd09f726b16fa5ab327d30ac0d 100644 (file)
@@ -126,7 +126,7 @@ public:
   //! Traverses through BVH tree to determine which structures are in view volume.
   void UpdateCulling (const Standard_Integer theViewId,
                       const OpenGl_BVHTreeSelector& theSelector,
-                      const Standard_Boolean theToTraverse);
+                      const Graphic3d_RenderingParams::FrustumCulling theFrustumCullingState);
 
   //! Returns TRUE if layer is empty or has been discarded entirely by culling test.
   bool IsCulled() const { return myNbStructuresNotCulled == 0; }
index 9e812784e81a85e4473ceb5a749f6eba34b3ecbe..294821928943abef9d1526dfd0a9bb1a550efc0b 100644 (file)
@@ -528,7 +528,7 @@ void OpenGl_LayerList::UpdateCulling (const Handle(OpenGl_Workspace)& theWorkspa
       continue;
     }
 
-    aLayer.UpdateCulling (aViewId, aSelector, theWorkspace->IsCullingEnabled());
+    aLayer.UpdateCulling (aViewId, aSelector, theWorkspace->View()->RenderingParams().FrustumCullingState);
   }
 
   aTimer.Stop();
index f6b3fa6c9b7fcf2286967c76984ce1ee86d9d8b5..4e9a35d101a4f390ff0eb7e91655d0a1a5d10ee7 100644 (file)
@@ -50,7 +50,6 @@ OpenGl_View::OpenGl_View (const Handle(Graphic3d_StructureManager)& theMgr,
   myDriver         (theDriver.operator->()),
   myCaps           (theCaps),
   myWasRedrawnGL   (Standard_False),
-  myCulling        (Standard_True),
   myBackfacing     (Graphic3d_TOBM_AUTOMATIC),
   myBgColor        (Quantity_NOC_BLACK),
   myCamera         (new Graphic3d_Camera()),
index c24873b86fd2650e9a5c6f1713fb666808f25902..29a74188d9c39bb014ae26ba99325fb48d12149f 100644 (file)
@@ -241,12 +241,6 @@ public:
   //! Sets environment texture for the view.
   Standard_EXPORT virtual void SetTextureEnv (const Handle(Graphic3d_TextureEnv)& theTextureEnv) Standard_OVERRIDE;
 
-  //! Returns the state of frustum culling optimization.
-  virtual Standard_Boolean IsCullingEnabled() const Standard_OVERRIDE { return myCulling; }
-
-  //! Enables or disables frustum culling optimization.
-  virtual void SetCullingEnabled (const Standard_Boolean theIsEnabled) Standard_OVERRIDE { myCulling = theIsEnabled; }
-
   //! Return backfacing model used for the view.
   virtual Graphic3d_TypeOfBackfacingModel BackfacingModel() const Standard_OVERRIDE { return myBackfacing; }
 
@@ -457,7 +451,6 @@ protected:
   Handle(OpenGl_Caps)      myCaps;
   Standard_Boolean         myWasRedrawnGL;
 
-  Standard_Boolean                myCulling;
   Graphic3d_TypeOfBackfacingModel myBackfacing;
   Quantity_ColorRGBA              myBgColor;
   Handle(Graphic3d_SequenceOfHClipPlane) myClipPlanes;
index 8e355a264d7fd2cc9c49d497ae7204359e1a2e5b..ab9fa9920353e52a6b467f434e937b39160e025c 100644 (file)
@@ -429,15 +429,6 @@ Standard_Integer OpenGl_Workspace::Height() const
   return !myView->GlWindow().IsNull() ? myView->GlWindow()->Height() : 0;
 }
 
-// =======================================================================
-// function : IsCullingEnabled
-// purpose  :
-// =======================================================================
-Standard_Boolean OpenGl_Workspace::IsCullingEnabled() const
-{
-  return myView->IsCullingEnabled();
-}
-
 // =======================================================================
 // function : FBOCreate
 // purpose  :
index 547af8334d24eb1b7dca9ced39de15645c5b055a..0874f5e648f0033f3d76dc6ee5188539d0466904 100644 (file)
@@ -3173,24 +3173,6 @@ void V3d_View::Translate (const Handle(Graphic3d_Camera)& theCamera,
   theCamera->Transform (aPanTrsf);
 }
 
-// =======================================================================
-// function : IsCullingEnabled
-// purpose  :
-// =======================================================================
-Standard_Boolean V3d_View::IsCullingEnabled() const
-{
-  return myView->IsCullingEnabled();
-}
-
-// =======================================================================
-// function : SetFrustumCulling
-// purpose  :
-// =======================================================================
-void V3d_View::SetFrustumCulling (const Standard_Boolean theToClip)
-{
-  myView->SetCullingEnabled (theToClip);
-}
-
 // =======================================================================
 // function : DiagnosticInformation
 // purpose  :
index d0ec47a4487187d821766df53635e55e3fb10143..85701bcf79c4156828d7d2f2b079fbfe37c6e29b 100644 (file)
@@ -911,10 +911,10 @@ public:
   Standard_EXPORT Graphic3d_RenderingParams& ChangeRenderingParams();
 
   //! @return flag value of objects culling mechanism
-  Standard_EXPORT Standard_Boolean IsCullingEnabled() const;
+  Standard_Boolean IsCullingEnabled() const { return RenderingParams().FrustumCullingState == Graphic3d_RenderingParams::FrustumCulling_On; }
 
-  //! Turn on/off automatic culling of objects outside frustrum (ON by default)
-  Standard_EXPORT void SetFrustumCulling (const Standard_Boolean theMode);
+  //! Turn on/off automatic culling of objects outside frustum (ON by default)
+  void SetFrustumCulling (Standard_Boolean theMode) { ChangeRenderingParams().FrustumCullingState = theMode ? Graphic3d_RenderingParams::FrustumCulling_On : Graphic3d_RenderingParams::FrustumCulling_Off; }
 
   //! Fill in the dictionary with diagnostic info.
   //! Should be called within rendering thread.
index 69beafb5496cc71f0a508de94e2854f4b940f793..a2c3ce8682844de110732ee3658025fcd97b6a88 100644 (file)
@@ -10430,6 +10430,9 @@ static Standard_Integer VRenderParams (Draw_Interpretor& theDI,
     }
     theDI << "depth pre-pass: " << (aParams.ToEnableDepthPrepass        ? "on" : "off") << "\n";
     theDI << "alpha to coverage: " << (aParams.ToEnableAlphaToCoverage  ? "on" : "off") << "\n";
+    theDI << "frustum culling: " << (aParams.FrustumCullingState == Graphic3d_RenderingParams::FrustumCulling_On  ? "on" :
+                                     aParams.FrustumCullingState == Graphic3d_RenderingParams::FrustumCulling_Off ? "off" :
+                                                                                                                    "noUpdate") << "\n";
     theDI << "\n";
     return 0;
   }
@@ -11103,6 +11106,39 @@ static Standard_Integer VRenderParams (Draw_Interpretor& theDI,
       }
       aView->ChangeRenderingParams().StatsMaxChartTime = (Standard_ShortReal )Draw::Atof (theArgVec[anArgIter]);
     }
+    else if (aFlag == "-frustumculling"
+          || aFlag == "-culling")
+    {
+      if (toPrint)
+      {
+        theDI << ((aParams.FrustumCullingState == Graphic3d_RenderingParams::FrustumCulling_On)  ? "on" :
+                  (aParams.FrustumCullingState == Graphic3d_RenderingParams::FrustumCulling_Off) ? "off" :
+                                                                                                   "noUpdate") << " ";
+        continue;
+      }
+
+      Graphic3d_RenderingParams::FrustumCulling aState = Graphic3d_RenderingParams::FrustumCulling_On;
+      if (++anArgIter < theArgNb)
+      {
+        TCollection_AsciiString aStateStr(theArgVec[anArgIter]);
+        aStateStr.LowerCase();
+        bool toEnable = true;
+        if (ViewerTest::ParseOnOff (aStateStr.ToCString(), toEnable))
+        {
+          aState = toEnable ? Graphic3d_RenderingParams::FrustumCulling_On : Graphic3d_RenderingParams::FrustumCulling_Off;
+        }
+        else if (aStateStr == "noupdate"
+              || aStateStr == "freeze")
+        {
+          aState = Graphic3d_RenderingParams::FrustumCulling_NoUpdate;
+        }
+        else
+        {
+          --anArgIter;
+        }
+      }
+      aParams.FrustumCullingState = aState;
+    }
     else
     {
       std::cout << "Error: wrong syntax, unknown flag '" << anArg << "'\n";
@@ -11159,53 +11195,6 @@ static Standard_Integer VProgressiveMode (Draw_Interpretor& /*theDI*/,
 }
 #endif
 
-//=======================================================================
-//function : VFrustumCulling
-//purpose  : enables/disables view volume's culling.
-//=======================================================================
-static int VFrustumCulling (Draw_Interpretor& theDI,
-                            Standard_Integer  theArgNb,
-                            const char**      theArgVec)
-{
-  Handle(V3d_View) aView = ViewerTest::CurrentView();
-  if (aView.IsNull())
-  {
-    std::cout << theArgVec[0] << " Error: Use 'vinit' command before\n";
-    return 1;
-  }
-
-  if (theArgNb < 2)
-  {
-    theDI << (aView->IsCullingEnabled() ? "on" : "off");
-    return 0;
-  }
-  else if (theArgNb != 2)
-  {
-    std::cout << theArgVec[0] << " Syntax error: Specify the mode\n";
-    return 1;
-  }
-
-  TCollection_AsciiString aModeStr (theArgVec[1]);
-  aModeStr.LowerCase();
-  Standard_Boolean toEnable = 0;
-  if (aModeStr == "on")
-  {
-    toEnable = 1;
-  }
-  else if (aModeStr == "off")
-  {
-    toEnable = 0;
-  }
-  else
-  {
-    toEnable = Draw::Atoi (theArgVec[1]) != 0;
-  }
-
-  aView->SetFrustumCulling (toEnable);
-  aView->Redraw();
-  return 0;
-}
-
 //=======================================================================
 //function : VXRotate
 //purpose  :
@@ -12628,13 +12617,12 @@ void ViewerTest::ViewerCommands(Draw_Interpretor& theCommands)
     "\n      '-perfUpdateInterval nbSeconds' Performance counters update interval"
     "\n      '-perfChart    nbFrames'    Show frame timers chart limited by specified number of frames"
     "\n      '-perfChartMax seconds'     Maximum time in seconds with the chart"
+    "\n      '-frustumCulling on|off|noupdate' Enable/disable objects frustum clipping or"
+    "\n                                        set state to check structures culled previously."
     "\n    Unlike vcaps, these parameters dramatically change visual properties."
     "\n    Command is intended to control presentation quality depending on"
     "\n    hardware capabilities and performance.",
     __FILE__, VRenderParams, group);
-  theCommands.Add("vfrustumculling",
-    "vfrustumculling [toEnable]: enables/disables objects clipping",
-    __FILE__,VFrustumCulling,group);
   theCommands.Add ("vplace",
             "vplace dx dy"
     "\n\t\t: Places the point (in pixels) at the center of the window",
index 5cf52b2b4c904473093d092c653169b3c2475ac0..810badf5d1bf6690228a2652a6be9e6e53140e72 100644 (file)
@@ -20,7 +20,7 @@ vclear
 vinit name=small_wnd l=32 t=32 w=$SMALL_WIN_WIDTH h=$SMALL_WIN_HEIGHT
 vactivate small_wnd
 vrenderparams -perfUpdateInterval 0
-vfrustumculling 0
+vrenderparams -frustumculling off
 vautozfit 0
 vviewparams -scale 1.953125 -eye 0.57735026918962573 -0.57735026918962573 0.57735026918962573
 vzrange 1 512
@@ -67,7 +67,7 @@ puts ""
 verase
 
 puts "Start displaying spheres with clipping..."
-vfrustumculling 1
+vrenderparams -frustumculling on
 vdisplayall
 puts [vfps]
 vrenderparams -perfCounters none
index f0e909ffc5833707cd27653c7d6aeacd0103d700..06852760e9a1c86d0504c72ab3079fbf99035c7c 100644 (file)
@@ -19,7 +19,7 @@ vclear
 vinit name=small_wnd l=32 t=32 w=$SMALL_WIN_WIDTH h=$SMALL_WIN_HEIGHT
 vactivate small_wnd
 vrenderparams -perfUpdateInterval 0
-vfrustumculling 0
+vrenderparams -frustumculling off
 vautozfit 0
 vviewparams -scale 1.953125 -eye 0.57735026918962573 -0.57735026918962573 0.57735026918962573
 vzrange 1 512
@@ -69,7 +69,7 @@ puts ""
 
 verase
 
-vfrustumculling 1
+vrenderparams -frustumculling on
 puts "Start displaying boxes with clipping..."
 for {set i 0} {$i < $BOXES_NUM} {incr i} {
   vdisplay -noupdate $aBoxNames($i)
index 0114171de82fceb3e40ac0906e47d5119dc60fbe..d49c084e58bdb6efe7ccecbc11b59aa527cfcc26 100644 (file)
@@ -9,7 +9,7 @@ puts ""
 box b 1 2 3
 vinit
 vdisplay b
-vfrustumculling 1
+vrenderparams -frustumculling on
 vfit
 
 vdump $imagedir/${casename}_default_layer.png
index 591c650cc0f1879acdbf23905d42b8228b16681d..285151e05d1826e6c277ee133dc85434dd46149a 100644 (file)
@@ -27,9 +27,9 @@ for {set i 0} {$i < $LINES_IN_ROW} {incr i} {
 
 vfit
 
-vfrustumculling 1
+vrenderparams -frustumculling on
 vdump $aWithCulling
-vfrustumculling 0
+vrenderparams -frustumculling off
 vdump $aNoCulling
 
 set aDiffRes [diffimage $aWithCulling $aNoCulling 0.1 0 0 $aDiff]
index 26d1ea5e4a11633ba0b401a2952df04363775592..8ab433bd71bf5fde3911a9b88bb06303290a6f5a 100644 (file)
@@ -62,7 +62,7 @@ set tcl_precision 16
 # Test orthographic camera without frustum culling.                #
 ####################################################################
 vcamera -ortho
-vfrustumculling 0
+vrenderparams -frustumculling off
 
 if { [test2d] != 1 } {
   puts "Error: 2D projection test failed: view frustum culling is OFF"
@@ -72,7 +72,7 @@ if { [test2d] != 1 } {
 # Test orthographic camera with frustum culling.                   #
 ####################################################################
 vcamera -ortho
-vfrustumculling 1
+vrenderparams -frustumculling on
 
 if { [test2d] != 1 } {
   puts "Error: 2D projection test failed: view frustum culling is ON"
index dfb98e371102845077bc15919c83f4a1329e1e1b..a3f327a84d86bb61c1121264ad582ff5663ae961 100644 (file)
@@ -88,7 +88,7 @@ set tcl_precision 16
 ####################################################################
 vcamera -ortho
 vviewparams -scale 1e-8
-vfrustumculling 0
+vrenderparams -frustumculling off
 
 if { [test3d 1e-7] != 1 } {
   puts "Error: 3D projection test failed: camera is orthographic, view frustum culling is OFF"
@@ -100,7 +100,7 @@ if { [test3d 1e-7] != 1 } {
 ####################################################################
 vcamera -ortho
 vviewparams -scale 1e-8
-vfrustumculling 1
+vrenderparams -frustumculling on
 
 if { [test3d 1e-7] != 1 } {
   puts "Error: 3D projection test failed: camera is orthographic, view frustum culling is ON"
@@ -111,7 +111,7 @@ if { [test3d 1e-7] != 1 } {
 # Test camera with less starting distance 1.0 to avoid jittering. #
 ####################################################################
 vcamera -persp
-vfrustumculling 0
+vrenderparams -frustumculling off
 
 if { [test3d 1.0] != 1 } {
   puts "Error: 3D projection test failed: camera is perspective, view frustum culling is OFF"
@@ -122,7 +122,7 @@ if { [test3d 1.0] != 1 } {
 # Test camera with less starting distance 1.0 to avoid jittering. #
 ####################################################################
 vcamera -persp
-vfrustumculling 1
+vrenderparams -frustumculling on
 
 if { [test3d 1.0] != 1 } {
   puts "Error: 3D projection test failed: camera is perspective, view frustum culling is ON"
diff --git a/tests/bugs/vis/bug30434 b/tests/bugs/vis/bug30434
new file mode 100644 (file)
index 0000000..e1ebfa8
--- /dev/null
@@ -0,0 +1,43 @@
+puts "============="
+puts "0030434: Visualization, TKV3d - add 'NoUpdate' state of frustum culling optimization"
+puts "============="
+
+pload VISUALIZATION
+vclear
+vinit View1
+
+set THE_NB_POINTS 10
+puts "Creating [expr $THE_NB_POINTS * $THE_NB_POINTS * $THE_NB_POINTS] points..."
+for {set i 0} {$i < $THE_NB_POINTS} {incr i} {
+  for {set j 0} {$j < $THE_NB_POINTS} {incr j} {
+    for {set k 0} {$k < $THE_NB_POINTS} {incr k} {
+      vpoint p$i$j$k 3.*$i 3.*$j 3.*$k
+    }
+  }
+}
+
+vcamera -ortho
+vfront
+vfit
+vzoom 2
+vrenderparams -frustumculling on
+vrenderparams -frustumculling noupdate
+vfit
+if { [vreadpixel 92 92 rgb name] == "YELLOW" } { puts "Error: point should be clipped earlier" }
+vdump $::imagedir/${::casename}_ortho_culled.png
+vrenderparams -frustumculling off
+if { [vreadpixel 92 92 rgb name] != "YELLOW" } { puts "Error: point should NOT be clipped" }
+vdump $::imagedir/${::casename}_ortho_all.png
+
+vcamera -persp
+vaxo
+vfit
+vzoom 3
+vrenderparams -frustumculling on
+vrenderparams -frustumculling noupdate
+vfit
+if { [vreadpixel 114 92 rgb name] == "YELLOW" } { puts "Error: point should be clipped earlier" }
+vdump $::imagedir/${::casename}_persp_culled.png
+vrenderparams -frustumculling off
+if { [vreadpixel 114 92 rgb name] != "YELLOW" } { puts "Error: point should NOT be clipped" }
+vdump $::imagedir/${::casename}_persp_all.png