[vtk-developers] OffScreenRendering example crashes when adding a texture
Kilgus, Thomas
t.kilgus at Dkfz-Heidelberg.de
Tue Apr 10 09:30:40 EDT 2012
Hi there,
I added a texture to the OffScreenRendering example ( http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/OffScreenRendering ) and now it crashes. All I did was to add the following lines:
//inserted after line 34 of the example
vtkSmartPointer<vtkPNGReader> reader = vtkSmartPointer<vtkPNGReader>::New();
reader->SetFileName("some image path");
reader->Update();
vtkSmartPointer<vtkTexture> texture = vtkSmartPointer<vtkTexture>::New();
texture->SetInputConnection(reader->GetOutputPort());
vtkSmartPointer<vtkActor> actor = vtkSmartPointer<vtkActor>::New(); //same as in example
actor->SetMapper(mapper); //same as in example
actor->SetTexture(texture); //added
The example works perfectly fine without the texture or if I disable MESA and use OpenGL only (so in that case I do not use OffScreenRendering and the texture is added to the sphere).
The crash occurs in vtkPixelBufferObject.cxx in line 305. I use MESA 7.10 in Ubuntu 11.04. I was able to reproduce this crash on two machines with the same configuration. Currently, I try to verify this on another machine using Arch Linux including a recent MESA version.
Does anyone have an idea why the texture does not work here? Is there maybe something wrong with my MESA build?
Best regards
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20120410/24841611/attachment.html>
More information about the vtk-developers
mailing list