issue with texturing an actor

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

issue with texturing an actor

-Daniel-
Hi everbody,

I want to represent an actor with a texture, but since the newer version it does not work anymore.
In the version 7.0 ran everything fine.


But unfortunately not with version 7.1.1


I tested it on Windows 7 32bit and on Windows 10 64bit.
I am using Java 1.8.


Does anyone have a hint for me?



Code snippet for testing:
...
  vtkJPEGReader jPEGReader = new vtkJPEGReader();
  jPEGReader.SetFileName ( imagename );
  jPEGReader.Update();
       
  vtkTexture texture = new vtkTexture();
  texture.SetInputConnection(jPEGReader.GetOutputPort());
       
  vtkOBJReader reader = new vtkOBJReader();
  reader.SetFileName(iname);
  reader.Update();
       
  vtkPolyData polyData2 = reader.GetOutput();
       
   // Renderer
  vtkPolyDataMapper mapper = new vtkPolyDataMapper();
  mapper.SetInputData(polyData2);
       
  vtkActor texActor= new vtkActor();
  texActor.SetMapper(mapper);
  texActor.SetTexture(texture);

  renderer.AddActor(texActor);
...

Loading...