Commit 3f8e0d77 authored by Ken Martin's avatar Ken Martin

two fixes for picking issues

First make sure the buffer is cleared properly when picking
some systems may have set the buffer to not clear but we
need a clear buffer to work.

Minor fix to possible issue with incorrect flat index in
composite poly data mapper.
parent 01e0dce5
......@@ -299,6 +299,11 @@ bool vtkHardwareSelector::CaptureBuffers()
this->Internals->OriginalGradient = this->Renderer->GetGradientBackground();
this->Renderer->GradientBackgroundOff();
int preserveDepth = this->Renderer->GetPreserveDepthBuffer();
int preserveColor = this->Renderer->GetPreserveColorBuffer();
this->Renderer->SetPreserveDepthBuffer(0);
this->Renderer->SetPreserveColorBuffer(0);
this->BeginSelection();
for (this->Iteration = 0; this->Iteration < 2; this->Iteration++)
{
......@@ -317,6 +322,9 @@ bool vtkHardwareSelector::CaptureBuffers()
}
this->EndSelection();
this->Renderer->SetPreserveDepthBuffer(preserveDepth);
this->Renderer->SetPreserveColorBuffer(preserveColor);
//restore original background
this->Renderer->SetBackground(this->Internals->OriginalBackground);
this->Renderer->SetGradientBackground(this->Internals->OriginalGradient);
......@@ -887,4 +895,3 @@ void vtkHardwareSelector::PrintSelf(ostream& os, vtkIndent indent)
os << indent << "UseProcessIdFromData: " << this->UseProcessIdFromData << endl;
os << indent << "ActorPassOnly: " << this->ActorPassOnly << endl;
}
......@@ -411,6 +411,7 @@ vtkCompositeMapperHelperData *vtkCompositeMapperHelper2::AddData(
this->Modified();
return hdata;
}
found->second->FlatIndex = flatIndex;
found->second->Marked = true;
return found->second;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment