From ea22583d1ae6d189e3a8a1c30d0c91892a2e5550 Mon Sep 17 00:00:00 2001 From: rnv Date: Tue, 17 Jan 2017 15:41:02 +0300 Subject: [PATCH] Issue 23406: [CEA 2010] problem display VTK viewer, opengl 'no depth buffer, no stencil buffer': first attempt --- src/Session/SALOME_Session_Server.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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! -- 2.39.2