[vtk-developers] [Paraview] CVS head crashes on Leopard at vtkCarbonRenderWindow

Clinton Stimpson clinton at elemtech.com
Thu Jan 15 11:47:47 EST 2009


Sean McBride wrote:
> On 1/15/09 6:54 AM, David Cole said:
>
>   
>> Sean, would you mind (1) fixing this or (2) reverting your
>> vtkCarbonRenderWindow change of 1.75 until somebody can figure out what it
>> takes to fix this...?
>>     
>
> I've returned CVS to a working state.  Sorry about the troubles!
>
> Clinton, any idea why this did not work

Now I see that I didn't look close enough at your patch, as I thought it 
was handling the case of apps without HIViews.  Sorry.

Here's what I think needs to happen.
In vtkCarbonRenderWindow::CreateAWindow(),
aglSetDrawable is replaced with aglSetWindowRef only if WindowId is 
NULL, and replaced with aglSetHIViewRef if WindowID is not NULL.  
ParaView needs aglSetHIViewRef, not aglSetWindowRef.

Then in vtkCarbonRenderWindow::UpdateGLRegion(), if WindowId != NULL and 
10.5 is the minimum version of OSX, skip all 100 or so lines of code and 
only call aglUpdateContext().
By calling aglSetHIViewRef, we're giving them enough data to do all of 
the code that happens in vtkCarbonRenderWindow::UpdateGLRegion(), so I'm 
assuming their implementation does that and we simply call 
aglUpdateContext(), and not have to go through the work of doing 
clipping based on other overlapping views.  And when skipping all 100 
lines of code, we're also skipping almost all of the deprecated apis.

If you make these changes, I'd test with ParaView, and a few random VTK 
tests, the Tk examples in the VTK tests, and the Qt examples with Qt3 
and Qt4, to test all the different code paths.  Its a bit complicated 
that it has to support apps with and without  HIViews.

I think at some time it would be good to make these changes.  Carbon 
apps aren't going away very soon.  And I've been curious if it'll help 
performance a bit not having to call all that old code.
Even Qt 4.5 uses Carbon by default, and it requires a configure switch 
to use Cocoa instead.

Clint




More information about the vtk-developers mailing list