Commit 2d67238f authored by Ken Martin's avatar Ken Martin Committed by Kitware Robot

Merge topic 'picking_fix'

3f8e0d77 two fixes for picking issues
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !4998
parents e8fddeb7 3f8e0d77
...@@ -299,6 +299,11 @@ bool vtkHardwareSelector::CaptureBuffers() ...@@ -299,6 +299,11 @@ bool vtkHardwareSelector::CaptureBuffers()
this->Internals->OriginalGradient = this->Renderer->GetGradientBackground(); this->Internals->OriginalGradient = this->Renderer->GetGradientBackground();
this->Renderer->GradientBackgroundOff(); this->Renderer->GradientBackgroundOff();
int preserveDepth = this->Renderer->GetPreserveDepthBuffer();
int preserveColor = this->Renderer->GetPreserveColorBuffer();
this->Renderer->SetPreserveDepthBuffer(0);
this->Renderer->SetPreserveColorBuffer(0);
this->BeginSelection(); this->BeginSelection();
for (this->Iteration = 0; this->Iteration < 2; this->Iteration++) for (this->Iteration = 0; this->Iteration < 2; this->Iteration++)
{ {
...@@ -317,6 +322,9 @@ bool vtkHardwareSelector::CaptureBuffers() ...@@ -317,6 +322,9 @@ bool vtkHardwareSelector::CaptureBuffers()
} }
this->EndSelection(); this->EndSelection();
this->Renderer->SetPreserveDepthBuffer(preserveDepth);
this->Renderer->SetPreserveColorBuffer(preserveColor);
//restore original background //restore original background
this->Renderer->SetBackground(this->Internals->OriginalBackground); this->Renderer->SetBackground(this->Internals->OriginalBackground);
this->Renderer->SetGradientBackground(this->Internals->OriginalGradient); this->Renderer->SetGradientBackground(this->Internals->OriginalGradient);
...@@ -887,4 +895,3 @@ void vtkHardwareSelector::PrintSelf(ostream& os, vtkIndent indent) ...@@ -887,4 +895,3 @@ void vtkHardwareSelector::PrintSelf(ostream& os, vtkIndent indent)
os << indent << "UseProcessIdFromData: " << this->UseProcessIdFromData << endl; os << indent << "UseProcessIdFromData: " << this->UseProcessIdFromData << endl;
os << indent << "ActorPassOnly: " << this->ActorPassOnly << endl; os << indent << "ActorPassOnly: " << this->ActorPassOnly << endl;
} }
...@@ -411,6 +411,7 @@ vtkCompositeMapperHelperData *vtkCompositeMapperHelper2::AddData( ...@@ -411,6 +411,7 @@ vtkCompositeMapperHelperData *vtkCompositeMapperHelper2::AddData(
this->Modified(); this->Modified();
return hdata; return hdata;
} }
found->second->FlatIndex = flatIndex;
found->second->Marked = true; found->second->Marked = true;
return found->second; 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