aPlaneFront = new Graphic3d_ClipPlane (aFrontEquation);
}
- // do some "memory allocation"-wise optimization
+ // Specify slicing planes with identity transformation
if (!aPlaneBack.IsNull() || !aPlaneFront.IsNull())
{
Graphic3d_SequenceOfHClipPlane aSlicingPlanes;
}
}
- // Apply user clipping planes
- if (!myClipPlanes.IsEmpty())
- {
- Graphic3d_SequenceOfHClipPlane aUserPlanes;
- Graphic3d_SequenceOfHClipPlane::Iterator aClippingIt (myClipPlanes);
- for (; aClippingIt.More(); aClippingIt.Next())
- {
- const Handle(Graphic3d_ClipPlane)& aClipPlane = aClippingIt.Value();
- if (aClipPlane->IsOn())
- {
- aUserPlanes.Append (aClipPlane);
- }
- }
-
- if (!aUserPlanes.IsEmpty())
- {
- // add planes at actual matrix state.
- aContext->ChangeClipping().AddWorld (aUserPlanes);
- }
-
- if (!aContext->ShaderManager()->IsEmpty())
- {
- aContext->ShaderManager()->UpdateClippingState();
- }
- }
-
#if !defined(GL_ES_VERSION_2_0)
// Setup view projection
glMatrixMode (GL_PROJECTION);
// Setup view orientation
theWorkspace->SetViewMatrix (theOrientation);
+ // Specify clipping planes in view transformation space
+ if (!myClipPlanes.IsEmpty())
+ {
+ Graphic3d_SequenceOfHClipPlane aUserPlanes;
+ Graphic3d_SequenceOfHClipPlane::Iterator aClippingIt (myClipPlanes);
+ for (; aClippingIt.More(); aClippingIt.Next())
+ {
+ const Handle(Graphic3d_ClipPlane)& aClipPlane = aClippingIt.Value();
+ if (aClipPlane->IsOn())
+ {
+ aUserPlanes.Append (aClipPlane);
+ }
+ }
+
+ if (!aUserPlanes.IsEmpty())
+ {
+ aContext->ChangeClipping().AddWorld (aUserPlanes);
+ }
+
+ if (!aContext->ShaderManager()->IsEmpty())
+ {
+ aContext->ShaderManager()->UpdateClippingState();
+ }
+ }
+
#if !defined(GL_ES_VERSION_2_0)
// Apply Lights
{