[vtkusers] vtkScalarBarActor & Disappearing actors.

Charl P. Botha c.p.botha at its.tudelft.nl
Mon Mar 10 14:44:42 EST 2003


On Mon, Mar 10, 2003 at 07:42:58PM +0200, Ron Inbar wrote:
> different vtkRenderWindows, you will end up with two display lists, which,
> most probably, will not have the same identifier.  But
> vtkOpenGLPolyDataMapper assumes (incorrectly) that the same identifier will
> work every time, so sometimes it attempts to render a display list using an
> identifier from the wrong context.  This usually leads to the wrong object

  if ( this->GetMTime() > this->BuildTime ||
       input->GetMTime() > this->BuildTime ||
       act->GetProperty()->GetMTime() > this->BuildTime ||
       ren->GetRenderWindow() != this->LastWindow)
    {

The above code is an extract from vtkOpenGLPolyDataMapper.cxx and shows that
this class DOES check for a changed RenderWindow.  In this case, it
re-generates display lists.

If you can point out more specifically where you believe this doesn't
happen, I would be most grateful.  Let's try and fix these problems (if they
exist) first.

> popping up in the window, and in other cases to objects disappearing.
> OpenGL has a ready-made solution to this problem: there is a mechanism that
> enables all contexts (i.e., windows) to share the same display lists and to
> identify them using the same numbers.  The only trouble is that VTK, for
> reasons unknown to me, doesn't use this list-sharing mechanism.
> 
> I successfully patched VTK 3.1 to fix this bug.  As soon as I find some free
> time I will do the same for VTK 4.x, and then I'll send you the patched
> sources.  I hope they will make it into the next release.

I would be more careful with that word.  NOT making use of shared contexts
is NOT a bug, although I do agree that utilising shared contexts is a very
useful feature.  The problem is that shared contexts is not available on all
GL implementations, so one would have to do careful checking in the code.

-- 
charl p. botha http://cpbotha.net/ http://visualisation.tudelft.nl/



More information about the vtkusers mailing list