[vtkusers] OffScreenRendering example crashes with texture?

Kilgus, Thomas t.kilgus at Dkfz-Heidelberg.de
Wed Apr 4 08:42:35 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.

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://www.vtk.org/pipermail/vtkusers/attachments/20120404/8a95c8af/attachment.htm>


More information about the vtkusers mailing list