[vtkusers] vtk and Java : problem when remove a vtkactor to a vtkrenderer or add a vtkrenderer to a vtkrenderwindow
Romain Ollivier
Romain.Ollivier at sophia.inria.fr
Tue Jul 8 09:19:00 EDT 2003
Hi all,
I've created a class wich extend vtkPanel to use it in a Swing based
application. In this vtkPanel, I want to add or remove actors from the
vtkRenderer like this :
public void removeActor(vtkActor actor)
{
ren.RemoveActor(actor);
}
public void addActor(vtkActor actor)
{
ren.AddActor(actor);
}
Adding actors works fine but when I remove an actor, my apps freeze
and I get :
Xlib: unexpected async reply (sequence 0x6b7)! (the
sequence is not always the same)
So i've tried to use multiple vtkRenderers, so that I create a new
vtkRenderer with the actors that I want each time the user want to
delete a vtkActor, remove the old vtkRenderer to the vtkRenderWindow and
add my new vtkRenderer :
public void removeRenderer(vtkRenderer renderer)
{
rw.RemoveRenderer(renderer);
}
public void addRenderer(vtkRenderer renderer)
{
rw.AddRenderer(renderer);
}
But when I'm trying to add the new renderer, I get the same problem : my
apps freeze and I get the unexpected async reply.
I work on a Linux RedHat 8.6 system with JDK 1.4 and VTK 4.2 with java
wrapping
Thank you,
Romain
More information about the vtkusers
mailing list