Author: eudoxos
Date: 2009-01-31 16:28:39 +0100 (Sat, 31 Jan 2009)
New Revision: 1649

Modified:
   trunk/gui/qt3/GLViewer.cpp
   trunk/gui/qt3/GLViewer.hpp
Log:
1. Lock GL when closing view. Seems to fix crashes / delays at exit

I am now getting machine hardlocks if I open second view (from the GUI) which 
used not to happen, AFAIK. Can someone confirm that? Thx.


Modified: trunk/gui/qt3/GLViewer.cpp
===================================================================
--- trunk/gui/qt3/GLViewer.cpp  2009-01-31 08:25:45 UTC (rev 1648)
+++ trunk/gui/qt3/GLViewer.cpp  2009-01-31 15:28:39 UTC (rev 1649)
@@ -38,6 +38,8 @@
        //this->doneCurrent();
 }
 
+GLViewer::~GLViewer(){ /* get the GL mutex when closing */ GLLock lock(this); }
+
 GLViewer::GLViewer(int id, shared_ptr<OpenGLRenderingEngine> _renderer, 
QWidget * parent, QGLWidget * shareWidget) : 
QGLViewer(parent,"glview",shareWidget)//, qglThread(this,rendererInit)
 {
        isMoving=false;

Modified: trunk/gui/qt3/GLViewer.hpp
===================================================================
--- trunk/gui/qt3/GLViewer.hpp  2009-01-31 08:25:45 UTC (rev 1648)
+++ trunk/gui/qt3/GLViewer.hpp  2009-01-31 15:28:39 UTC (rev 1649)
@@ -61,7 +61,7 @@
                enum{TIME_REAL=1,TIME_VIRT=2,TIME_ITER=4};
 
                GLViewer (int id, shared_ptr<OpenGLRenderingEngine> _renderer, 
QWidget * parent=0, QGLWidget * shareWidget=0);
-               virtual ~GLViewer (){};
+               virtual ~GLViewer();
                virtual void paintGL();
                virtual void draw();
                virtual void drawWithNames();


_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to