From: rnv Date: Tue, 17 Jan 2017 12:41:02 +0000 (+0300) Subject: Issue 23406: [CEA 2010] problem display VTK viewer, opengl 'no depth buffer, no stenc... X-Git-Tag: SHAPER_2.7.0~3^2^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ea22583d1ae6d189e3a8a1c30d0c91892a2e5550;p=modules%2Fgui.git Issue 23406: [CEA 2010] problem display VTK viewer, opengl 'no depth buffer, no stencil buffer': first attempt --- diff --git a/src/Session/SALOME_Session_Server.cxx b/src/Session/SALOME_Session_Server.cxx index 021cc2643..61a1fe9e7 100755 --- a/src/Session/SALOME_Session_Server.cxx +++ b/src/Session/SALOME_Session_Server.cxx @@ -77,6 +77,9 @@ #include #include #include +#if QT_VERSION > QT_VERSION_CHECK(5, 0, 0) +#include +#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!