vtkPanel possible bug

Igor Fridman pnin22 at yahoo.com
Thu Jul 1 12:03:59 EDT 1999


While browsing through vtkPanel, i believe there's a
small bug in the function Render().  If Render() is
called and there are no visible actors in the
renderer, the function returns without setting the
rendering variable back to false.  This prevents
further rendering...

see code:

public synchronized void Render() 
  {
    if (!rendering)
      {
      rendering = true;
//NEED TO ADD 'rendering = false' to 'if' statement
     if (ren.VisibleActorCount() == 0) return;
      if (rw != null)
	{
	if (windowset == 0)
	  { 
	  // set the window id and the active camera
	  rw.SetWindowInfo(this.getWindowInfo());
	  cam = ren.GetActiveCamera();
	  ren.AddLight(lgt);
	  lgt.SetPosition(cam.GetPosition());
	  lgt.SetFocalPoint(cam.GetFocalPoint());
	  windowset = 1;
	  }
	rw.Render();
	rendering = false;
	}
      }
  }

===
==================================================
Igor Fridman

Naval Research Laboratory
Vacuum Electronics Branch Code 6841
4555 Overlook Ave. S.W., Washington, DC 20375, USA
==================================================
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------





More information about the vtkusers mailing list