[wxVTK] wxVTK/src wxVTKRenderWindowInteractor.cxx, 1.53, 1.54 wxVTKRenderWindowInteractor.h, 1.24,
Brought to you by:
malat
From: Sander N. <svn...@us...> - 2014-09-12 09:57:49
|
Update of /cvsroot/wxvtk/wxVTK/src In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16047 Modified Files: wxVTKRenderWindowInteractor.cxx wxVTKRenderWindowInteractor.h Log Message: Update for compatibility with VTK 5.10 and wxWidgets 3.0 It is now mandatory to manage ones own GL context Index: wxVTKRenderWindowInteractor.h =================================================================== RCS file: /cvsroot/wxvtk/wxVTK/src/wxVTKRenderWindowInteractor.h,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** wxVTKRenderWindowInteractor.h 3 Mar 2009 16:20:43 -0000 1.24 --- wxVTKRenderWindowInteractor.h 12 Sep 2014 09:57:47 -0000 1.25 *************** *** 159,162 **** --- 159,165 ---- protected: + #if defined(__WXGTK__) && defined(USE_WXGLCANVAS) + wxGLContext *context; + #endif wxTimer timer; int ActiveButton; Index: wxVTKRenderWindowInteractor.cxx =================================================================== RCS file: /cvsroot/wxvtk/wxVTK/src/wxVTKRenderWindowInteractor.cxx,v retrieving revision 1.53 retrieving revision 1.54 diff -C2 -d -r1.53 -r1.54 *** wxVTKRenderWindowInteractor.cxx 1 Oct 2013 17:03:38 -0000 1.53 --- wxVTKRenderWindowInteractor.cxx 12 Sep 2014 09:57:46 -0000 1.54 *************** *** 196,199 **** --- 196,202 ---- vtkDebugLeaks::ConstructClass("wxVTKRenderWindowInteractor"); #endif + #if defined(__WXGTK__) && defined(USE_WXGLCANVAS) + this->context = new wxGLContext(this); + #endif this->RenderWindow = NULL; this->SetRenderWindow(vtkRenderWindow::New()); *************** *** 228,231 **** --- 231,237 ---- vtkDebugLeaks::ConstructClass("wxVTKRenderWindowInteractor"); #endif + #if defined(__WXGTK__) && defined(USE_WXGLCANVAS) + this->context = new wxGLContext(this); + #endif this->RenderWindow = NULL; this->SetRenderWindow(vtkRenderWindow::New()); *************** *** 242,245 **** --- 248,254 ---- SetRenderWindow(NULL); SetInteractorStyle(NULL); + #if defined(__WXGTK__) && defined(USE_WXGLCANVAS) + delete this->context; + #endif } //--------------------------------------------------------------------------- *************** *** 274,278 **** Enabled = 1; #if defined(__WXGTK__) && defined(USE_WXGLCANVAS) ! SetCurrent(); #endif Modified(); --- 283,287 ---- Enabled = 1; #if defined(__WXGTK__) && defined(USE_WXGLCANVAS) ! wxGLCanvas::SetCurrent(*this->context); #endif Modified(); *************** *** 833,836 **** --- 842,848 ---- if (renderAllowed) { + #if defined(__WXGTK__) && defined(USE_WXGLCANVAS) + wxGLCanvas::SetCurrent(*(this->context)); + #endif if(Handle && (Handle == GetHandleHack()) ) { |