0030223: Visualization, TKOpenGl - frustum culling does not clip objects within persp...
authorosa <osa@opencascade.com>
Tue, 11 Dec 2018 10:40:40 +0000 (13:40 +0300)
committerapn <apn@opencascade.com>
Thu, 13 Dec 2018 10:33:42 +0000 (13:33 +0300)
Fixed multiplication order of Projection and WorldView matrices

src/OpenGl/OpenGl_BVHTreeSelector.cxx

index b696305e265c35d14460e937ac702d132a431e32..396e6efa0a95f74b92b1823408b777d5e4564636 100644 (file)
@@ -93,7 +93,7 @@ void OpenGl_BVHTreeSelector::SetViewVolume (const Handle(Graphic3d_Camera)& theC
   OpenGl_Vec4d aRightBottomNear (nRight, nBottom, -aNear, 1.0), aLeftTopFar     (fLeft,  fTop,    -aFar, 1.0);
   OpenGl_Vec4d aRightTopNear    (nRight, nTop,    -aNear, 1.0), aLeftBottomFar  (fLeft,  fBottom, -aFar, 1.0);
 
-  const OpenGl_Mat4d aViewProj = myWorldViewMat * myProjectionMat;
+  const OpenGl_Mat4d aViewProj = myProjectionMat * myWorldViewMat;
   OpenGl_Mat4d anInvWorldView;
   myWorldViewMat.Inverted (anInvWorldView);