Index: Rendering/vtkCarbonRenderWindow.cxx =================================================================== RCS file: /cvsroot/VTK/VTK/Rendering/vtkCarbonRenderWindow.cxx,v retrieving revision 1.74 diff -u -r1.74 vtkCarbonRenderWindow.cxx --- Rendering/vtkCarbonRenderWindow.cxx 2 Jan 2009 18:51:03 -0000 1.74 +++ Rendering/vtkCarbonRenderWindow.cxx 12 Jan 2009 16:07:14 -0000 @@ -446,7 +446,11 @@ } // Associate the OpenGL context with the control's window, and establish the buffer rect. +#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 + aglSetWindowRef(this->ContextId, this->GetRootWindow()); +#else aglSetDrawable(this->ContextId, GetWindowPort(this->GetRootWindow())); +#endif aglSetInteger(this->ContextId, AGL_BUFFER_RECT, bufferRect); aglEnable(this->ContextId, AGL_BUFFER_RECT); @@ -752,8 +756,13 @@ return; } +#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 + // attach the WindowRef to the context + if (!aglSetWindowRef (this->ContextId, this->GetRootWindow())) +#else // attach the CGrafPtr to the context if (!aglSetDrawable (this->ContextId, GetWindowPort (this->GetRootWindow()))) +#endif { aglReportError(); return;