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
{
--- /dev/null
+puts "============"
+puts "OCC24717"
+puts "============"
+puts ""
+####################################################################################
+# TKOpenGl - globally defined clipping planes blink when operating with view
+# Test checks that state of clippings always corresponds to a state of viewed
+# scene.
+####################################################################################
+
+set check_x 204
+set check_y 204
+
+vinit View1
+vsetdispmode 1
+box b 1 1 1
+vdisplay b
+vmoveto $check_x $check_y
+vclipplane create pln1
+vclipplane set pln1 view Driver1/Viewer1/View1
+vclipplane change pln1 equation 0 1 0 0
+vfit
+
+checkcolor $check_x $check_y 0 1 1
+
+if {$stat != 1} {
+ puts "Error : Viewer clipping is broken."
+}
+
+vdump ${imagedir}/${casename}.png