]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Issue 23406: [CEA 2010] problem display VTK viewer, opengl 'no depth buffer, no stenc... rnv/23406
authorrnv <rnv@opencascade.com>
Tue, 17 Jan 2017 12:41:02 +0000 (15:41 +0300)
committerrnv <rnv@opencascade.com>
Tue, 17 Jan 2017 12:41:02 +0000 (15:41 +0300)
src/Session/SALOME_Session_Server.cxx

index 021cc2643e035748ffef4c551dcd52e0c1f627f6..61a1fe9e70ff84fec65ecdb4b8387b99ae02631d 100755 (executable)
@@ -77,6 +77,9 @@
 #include <QWaitCondition>
 #include <QRegExp>
 #include <QTextStream>
+#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
+#include <QSurfaceFormat>
+#endif
 
 /*! - read arguments, define list of server to launch with their arguments.
  * - wait for naming service
@@ -366,6 +369,15 @@ int main( int argc, char **argv )
       QLocale::setDefault( QLocale::system() );
     }
   }
+  
+#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0)
+  // initialization of the X11 visual on Linux
+  QSurfaceFormat format;
+  format.setDepthBufferSize(16);
+  format.setStencilBufferSize(1);
+  format.setProfile(QSurfaceFormat::CompatibilityProfile);
+  QSurfaceFormat::setDefaultFormat(format);
+#endif
 
   // Create Qt application instance;
   // this should be done the very first!