[vtkusers] Shadow casting: vtkFrameBufferObject.h not found in example code

BBerco bebe0705 at colorado.edu
Tue Jan 30 16:00:23 EST 2018


Thanks, I was able to build and run the example. Unfortunately I'm having
issues when I'm turning up the mutual shadowing in my application, built
around a qvtkwidget

Upon clicking on a GUI element, I'm executing the following code (directly
taken from the example) that should turn on mutual shadowing (that is, an
actor can cast a shadow over another actor).

To this end, I've added a scene light to the renderer and removed the
default headlight. Two things:

1: Although the scene exactly behaves like it should, vtk is displaying a
warning message on my terminal, claiming that a " light has unknown light
type" . I created the scene light by passing 0 to the SetLightType(int)
method.
2: If at least one actor is displayed in the renderer, Render() runs into a
segmentation fault (see comment at the very bottom of the code).

Also, provided that I get the mutual shadowing to work, is there a way to
dynamically update the shadow locations or is this a static process that
needs to be repeated?

 
*
vtkSmartPointer<vtkShadowMapPass> shadows =
vtkSmartPointer<vtkShadowMapPass>::New();

	vtkSmartPointer<vtkSequencePass> seq =
vtkSmartPointer<vtkSequencePass>::New();
	vtkSmartPointer<vtkRenderPassCollection> passes
=vtkSmartPointer<vtkRenderPassCollection>::New();
	
	passes -> AddItem(shadows -> GetShadowMapBakerPass());
	passes -> AddItem(shadows);
	seq -> SetPasses(passes);

	vtkSmartPointer<vtkCameraPass> cameraP =
vtkSmartPointer<vtkCameraPass>::New();
	cameraP->SetDelegatePass(seq);

	vtkOpenGLRenderer *glrenderer = vtkOpenGLRenderer::SafeDownCast(this ->
parent -> get_renderer());
	glrenderer->SetPass(cameraP);
       // segfaults inside Render()
	this -> parent -> qvtkWidget -> GetRenderWindow() -> Render();*



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html


More information about the vtkusers mailing list