[vtk-developers] glxMakeCurrent and Hardware Picking issue

obara obara at simmetrix.com
Thu Jun 14 11:18:19 EDT 2001


Hi Folks,

As you may know Simmetrix has been looking into the performance issue of 
VTK when large numbers of actors are involved.  One of the things that 
were noticed was vtkOpenGLActor calls glxMakeCurrent every time the actor 
(the call is actually in the mapper) is rendered.

Besides this possibly being a performance issue, this also introduces a 
problem when using hardware picking.  When using the default picker (in 
3.2) with QT I noticed that the OpenGL QT widget complains that 
glxMakeCurrent fails when a pick is performed (in fact there are multiple 
messages) - The problem is that hardware picking requires OpenGL's 
rendering mode to be GL_SELECT and when in that mode glxMakeCurrent will 
fail.

I'm not too sure why during a normal render process the actor is calling 
glxMakeCurrent to begin with (Maybe it depends on a result from a 
different window) - but in general I'm not sure that people do this and 
this approach will fail if hardware picking is being done.

As a side issue:  When doing a pick, eventually the mapper's render() 
function is called and at least in the case of vtkOpenGLPolyDataMapper 
the graphical representation could be modified since RenderPiece() checks 
the modification information - this could be somewhat problematic if the 
user was doing a pick involving an animated scene since the object that 
was under the cursor before may have "moved" due to the fact that the 
picking process caused an update to the scene.

Any Ideas/Comments?

Bob

Robert M. O'Bara
Senior Software Engineer
Simmetrix Inc.
1223 Peoples Ave.
Troy, NY 12180

Lab: (518) 276-2867
Main Office: (518) 276-2729






More information about the vtk-developers mailing list