[vtkusers] EDL on VTK7

rich richuitnl at gmail.com
Tue Feb 23 17:25:53 EST 2016


Ok, I have given it a shot. It is not complaining but the slider is drawn,
although a bit small and the view becomes black. This is my code:

	// The elementary passes.
		auto lights = vtkSmartPointer<vtkLightsPass>::New();
		auto opa =  vtkSmartPointer<vtkOpaquePass>::New();
		auto tran =  vtkSmartPointer<vtkTranslucentPass>::New();
		auto volu = vtkSmartPointer< vtkVolumetricPass>::New();

		// Put them in a sequence.
		vtkRenderPassCollection *passes = vtkRenderPassCollection::New();
		passes->AddItem(lights);
		passes->AddItem(opa);
		passes->AddItem(tran);
		passes->AddItem(volu);

		auto seq1 = vtkSmartPointer<vtkSequencePass>::New();
		seq1->SetPasses(passes);

		edl = vtkSmartPointer<vtkEDLShading>::New();
		edl->SetDelegatePass(seq1);
		
		auto passes2 = vtkRenderPassCollection::New();
		passes2->AddItem(edl);

		auto ova = vtkSmartPointer<vtkOverlayPass>::New();
		passes2->AddItem(ova);

		auto seq2 = vtkSmartPointer<vtkSequencePass>::New();
		seq2->SetPasses(passes2);

		// Make the sequence the delegate of a camera pass.
		auto cameraP = vtkSmartPointer<vtkCameraPass>::New();
		cameraP->SetDelegatePass(seq2);

		// tell the renderer to use our render pass pipeline
		vtkOpenGLRenderer *glrenderer = vtkOpenGLRenderer::SafeDownCast(renderer);
		if (glrenderer != nullptr)
		{
			glrenderer->SetPass(cameraP.Get());
		}

There should probably be another camera pass. In the inner sequence you
proposed a camera pass. Buti this failed because the error message said it
had no delegate assigned to it. I tried to add it to a sequence but that is
not allowed.

Please have a look and help me out? thanks!!



--
View this message in context: http://vtk.1045678.n5.nabble.com/EDL-on-VTK7-tp5736766p5736772.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list