vtkOpenGLGlyph3DMapper does not enable/disable clipping planes
This issue was created automatically from an original Mantis Issue. Further discussion may take place here.
Change to vtkOpenGLGlyph3DMapper::Render, to correct enable/disable clipping planes -
if (!immediateMode) { this->TimeToDraw = 0.0; this->Timer->StartTimer();
// ADSK, JNH, turn on clipping planes
int numClipPlanes = this->GetNumberOfClippingPlanes();
if (numClipPlanes > 6)
{
vtkErrorMacro(<< "OpenGL has a limit of 6 clipping planes");
numClipPlanes = 6;
}
for (int i = 0; i < numClipPlanes; i++)
{
double planeEquation[4];
this->GetClippingPlaneInDataCoords(actor->GetMatrix(), i, planeEquation);
GLenum clipPlaneId = static_cast<GLenum>(GL_CLIP_PLANE0 + i);
glEnable(clipPlaneId);
glClipPlane(clipPlaneId, planeEquation);
}
glCallList(this->DisplayListId);
// ADSK, JNH, turn off clipping planes
for (int c = 0; c < numClipPlanes; c++)
{
GLenum clipPlaneId = static_cast<GLenum>(GL_CLIP_PLANE0 + c);
glDisable(clipPlaneId);
}
this->Timer->StopTimer();
this->TimeToDraw += this->Timer->GetElapsedTime();
}