[vtkusers] "a vtkShader2 object is being deleted before ReleaseGraphicsResources() has been called." with vtkVolume->setMapper
Tijmen Klein
T.R.Klein at student.rug.nl
Wed Oct 5 07:50:08 EDT 2011
I recently updated VTK from 5.6 to the 5.9 version from Git. Now when I
close my application, I get this error repeated quite a few times: "a
vtkShader2 object is being deleted before ReleaseGraphicsResources() has
been called."
After a while I found the origin of the this problem. I have a vtkVolume,
and throughout the program the mapper of this vtkVolume is gets changed. So,
every now and then I do a call vtkVolume->setMapper(someMapper);
This used to work fine, and the (visual) results do still work. However,
when I comment out the setMapper() lines, the errors do not occur when
exiting. I was able to get rid of the errors by prepending the setMapper()
call with a ReleaseGraphicsResources() call. So my code now looks something
like this:
volume->ReleaseGraphicsResources(renWin);
volume->SetMapper(volumeMapper);
Is this intended and expected behavior, or is it a bug?
Cheers,
Tijmen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111005/fa754114/attachment.htm>
More information about the vtkusers
mailing list