Skip to content

Commit

Permalink
Improve Startup Performance (#1635)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yogesh9000 authored Sep 27, 2024
1 parent af480fe commit df8c01a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions vtkext/private/module/vtkF3DGenericImporter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ struct ReaderPipeline
ReaderPipeline()
{
this->GeometryActor->GetProperty()->SetInterpolationToPBR();
this->VolumeMapper->SetRequestedRenderModeToGPU();
this->PolyDataMapper->InterpolateScalarsBeforeMappingOn();
}

Expand All @@ -47,7 +46,7 @@ struct ReaderPipeline
vtkNew<vtkVolume> VolumeProp;
vtkNew<vtkPolyDataMapper> PolyDataMapper;
vtkNew<vtkPointGaussianMapper> PointGaussianMapper;
vtkNew<vtkSmartVolumeMapper> VolumeMapper;
vtkSmartPointer<vtkSmartVolumeMapper> VolumeMapper;

vtkDataSet* Output = nullptr;
vtkDataSetAttributes* PointDataForColoring = nullptr;
Expand Down Expand Up @@ -213,6 +212,12 @@ void vtkF3DGenericImporter::ImportActors(vtkRenderer* ren)
// Add filter outputs to mapper inputs
pipe.PolyDataMapper->SetInputConnection(pipe.PostPro->GetOutputPort(0));
pipe.PointGaussianMapper->SetInputConnection(pipe.PostPro->GetOutputPort(1));

if (!pipe.VolumeMapper)
{
pipe.VolumeMapper = vtkSmartPointer<vtkSmartVolumeMapper>::New();
pipe.VolumeMapper->SetRequestedRenderModeToGPU();
}
pipe.VolumeMapper->SetInputConnection(pipe.PostPro->GetOutputPort(2));

// Set geometry actor default properties
Expand Down

0 comments on commit df8c01a

Please sign in to comment.