[vtkusers] Workaround: ChoosePixelFormat failed error

Christopher Bruns cmbruns at stanford.edu
Tue May 10 21:41:20 EDT 2005


  Sometimes my vtk application fails with an error dialog

"ChoosePixelFormat failed".  After I click the "OK" button, the 
application immediately exits.  I see that this error has been mentioned 
many times on this list, but no satisfying wisdom has resulted.  One 
user said that upgrading OpenGL drivers solved the problem.

 For me, it only sometimes happens.  And only when the very first thing 
to be rendered is large and complicated.  It appears to happen during a 
call to vtkRenderWindow->GetActiveCamera(), following a spontaneous java 
repaint event.  I am using java bindings to vtk on a WindowsXP machine.

 If I render something small and simple first, there is no problem.  I 
can then render my large hairy structure without errors.  So for now, my 
application starts by displaying a stupid little cone.  Then the fancy 
stuff is rendered later.

 Perhaps my observation may help others who see this problem.  Ideally, 
someone smarter than me will synthesize these few additional details and 
propose a more general solution to the problem.

-Chris Bruns






More information about the vtkusers mailing list