[vtkusers] GUI grayout

R K Shyamprakash ramakrishna.prakash at quest-global.com
Wed Jul 16 03:36:49 EDT 2003


Hello,
	I have developed an application which has 4 render windows. I will be
adding and removing the actors frequently.If I continue the operation long
enough, say 10 minutes, the GUI of the application(menubar, toolbar, tabs of
the tabbedpane, statusbar etc gets grayedout) freezes but interestingly the
vtkwindow remains intact. I can still rotate, pan the 3d object. following
is the code where I remove actors.

public void clearViewer(){
	Lock();
	vtkActor temp = null;
	vtkActorCollection collection = GetRenderer().GetActors();
	if (collection == null) {
		return;
	}

	int numActors = collection.GetNumberOfItems();

	collection.InitTraversal();
	for (i = 0; i < numActors; i++) {
		temp = collection.GetNextActor();
		if (temp != null) {
			GetRenderer().RemoveActor(temp);
			//temp.ReleaseGraphicsResources(rw); uncommenting this line didn't help
		}
	}
	ren.Clear();  //ren id vtkRenderer
	UnLock();
}

Is there anything else I should take care while clearing the renderer or its
some thing else? Any suggestions will be of great help. I am using vtk 4.2
with Java 1.4.1_02.

Thanks
Shyam




More information about the vtkusers mailing list