Program: Visualization Toolkit
Module: $RCSfile: creawxVTKRenderWindowInteractor.cxx,v $
Language: C++
- Date: $Date: 2011/02/22 08:26:24 $
- Version: $Revision: 1.7 $
+ Date: $Date: 2011/07/12 09:38:09 $
+ Version: $Revision: 1.8 $
Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
#include "vtkDebugLeaks.h"
#ifdef __WXMAC__
-#include "vtkCarbonRenderWindow.h"
+#ifdef VTK_USE_COCOA
+ #include "vtkCocoaRenderWindow.h"
+#else
+ #include "vtkCarbonRenderWindow.h"
+#endif
+
#endif
//Keep this for compatibilty reason, this was introduced in wxGTK 2.4.0
EVT_SIZE (creawxVTKRenderWindowInteractor::OnSize)
END_EVENT_TABLE()
-//EED win Compilation why??: vtkCxxRevisionMacro(creawxVTKRenderWindowInteractor, "$Revision: 1.7 $")
+//EED win Compilation why??: vtkCxxRevisionMacro(creawxVTKRenderWindowInteractor, "$Revision: 1.8 $")
vtkInstantiatorNewMacro(creawxVTKRenderWindowInteractor)
//---------------------------------------------------------------------------
// get vtk to render to the wxWindows
Render();
#ifdef __WXMAC__
- // This solves a problem with repainting after a window resize
+
+#ifdef VTK_USE_COCOA
+ vtkCocoaRenderWindow* rwin = vtkCocoaRenderWindow::SafeDownCast(RenderWindow);
+ if( rwin )
+ {
+ rwin->UpdateContext();
+ }
+#else
+ // This solves a problem with repainting after a window resize
// See also: http://sourceforge.net/mailarchive/forum.php?thread_id=31690967&forum_id=41789
vtkCarbonRenderWindow* rwin = vtkCarbonRenderWindow::SafeDownCast(RenderWindow);
if( rwin )
rwin->UpdateGLRegion();
}
#endif
+#endif
}
//---------------------------------------------------------------------------
void creawxVTKRenderWindowInteractor::OnEraseBackground(wxEraseEvent &event)